QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#64705 | #1261. Inv | zhoukangyang | WA | 149ms | 3392kb | C++11 | 574b | 2022-11-25 12:28:32 | 2022-11-25 12:28:32 |
Judging History
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 me(a, x) memset(a, x, sizeof(a))
using namespace std;
const int N = 1.25e5 + 7;
int n, m;
bitset < N > bs, cur;
int main() {
ios :: sync_with_stdio(false);
cin.tie(0); cout.tie(0);
cin >> n >> m;
bs.set(0);
L(i, 1, n) {
cur = bs;
L(t, 1, i - 1)
cur <<= 1, cur ^= bs;
}
cout << ((bool) cur[m]) << '\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3392kb
input:
4 1
output:
1
result:
ok answer is '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3372kb
input:
10 21
output:
0
result:
ok answer is '0'
Test #3:
score: 0
Accepted
time: 149ms
memory: 3224kb
input:
500 124331
output:
0
result:
ok answer is '0'
Test #4:
score: -100
Wrong Answer
time: 1ms
memory: 3232kb
input:
20 122
output:
0
result:
wrong answer expected '1', found '0'