QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#106471#2072. Junk ProblemzhoukangyangWA 2ms3336kbC++171.1kb2023-05-17 21:00:262023-05-17 21:00:30

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-17 21:00:30]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3336kb
  • [2023-05-17 21:00:26]
  • 提交

answer

#include<bits/stdc++.h>
#define L(i, j, k) for(int i = (j); i <= (k); ++i)
#define R(i, j, k) for(int i = (j); i >= (k); --i)
#define ll long long 
#define vi vector < int > 
#define sz(a) ((int) (a).size())
#define ull unsigned long long 
#define me(a, x) memset(a, x, sizeof(a))
using namespace std;
const int N = 1e6 + 7;
int n;
int k;

int f;
inline int mul(int x, int y) {
	int w = 0;
	L(i, 0, k) if(x >> i & 1) w ^= y << i;
	R(i, k * 2, k) if(w >> i & 1) w ^= f << (i - k);
	return w;
}

mt19937_64 orz(114514);
int ans[N];
int main() {
	ios :: sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	cin >> n;
	while((4 << (k * 2)) <= n) ++k;
	while(true) {
		f = (1 << k) + orz() % (1 << k);
		int okay = 1;
		L(d, 1, min((k + 1) / 2, k - 1)) {
			L(z, 0, (1 << d) - 1) {
				int cur = f, cp = z + (1 << d);
				R(i, k, d) 
					if(cur >> i & 1) 
						cur ^= cp << (i - d);
				if(!cur) {
					okay = 0;
					break; 
				}
			}
		}
		if(okay) break;
	}
	L(i, 0, (1 << k) - 1) 
		ans[i] = (i ^ ((1 ^ mul(mul(i, i), i)) << k));
	L(i, 0, (1 << k) - 1) 
		cout << ans[i] << '\n';
	return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3336kb

input:

49

output:

4
1
2
3

result:

wrong output format Unexpected end of file - int32 expected