跳到正文

题解

题解:P12197 Hash Killer I

yuguo_upup约 1 分钟
原文
文章信息与版本

文章信息

发布
2025年11月7日
收录
2026年4月2日
更新
2026年8月24日
篇幅
约 1 分钟
题目
P12197

版本

  1. v1当前

直接上正解!

C++
#include <bits/stdc++.h>
using namespace std;
int main() {
	int n=1<<11,l=n>>1;
	printf("%d %d\n",n,l);
	for(int i=0;i<n;i++){
		putchar('a'+(__builtin_popcount(i)&1));
	}
}
原文