#include"bits/stdc++.h"
using namespace std;
int encode (int n, int x, int y) {
int ret = 0;
for (int i : {2, 3, 5, 7, 11}) {
ret ^= x % i;
}
return ret;
}
#include"bits/stdc++.h"
using namespace std;
int decode (int n, int q, int h) {
int ret = 0;
for (int i : {2, 3, 5, 7, 11}) {
ret ^= q % i;
}
if (ret == h) return 1;
else return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
416 KB |
the encoded value must be greater than or equal to 1 |
2 |
Incorrect |
0 ms |
420 KB |
the encoded value must be greater than or equal to 1 |