QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#624229 | #6110. Squirrel Game | ghosh__# | WA | 0ms | 3724kb | C++23 | 953b | 2024-10-09 15:17:26 | 2024-10-09 15:17:27 |
Judging History
answer
#include <bits/stdc++.h>
#define LL long long
#define mod %
using namespace std;
const int MAXN = 1e5 + 5;
LL n, m, k, b[MAXN], a[MAXN];
inline void solve () {
cin >> m >> n >> k;
for (int i = 1; i <= n; i++)
cin >> b[i];
for (int i = 1; i <= n; i++)
a[i] = b[i] - b[i - 1] - 1;
LL ans = 0;
bool flag = true;
for (int i = n; i >= 1;) {
int j = i;
for (int d = 1; d <= k && j >= 1; d++) {
if (flag) {
ans ^= a[j];
//cout << "pos = " << j << endl;
}
j--;
}
i = j - 1;
flag ^= 1;
}
//cout << "sg = " << ans << endl;
if (!ans) {
cout << "Nova" << endl;
} else {
cout << "Twinkle" << endl;
}
}
int main () {
ios_base::sync_with_stdio (false);
cin.tie (nullptr);
cout.tie (nullptr);
solve ();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3596kb
input:
7 3 2 1 4 7
output:
Nova
result:
ok single line: 'Nova'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
7 3 1 1 4 7
output:
Twinkle
result:
ok single line: 'Twinkle'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
1 1 1 1
output:
Nova
result:
ok single line: 'Nova'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
1 1 10 1
output:
Nova
result:
ok single line: 'Nova'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
100000 1 1 19593
output:
Twinkle
result:
ok single line: 'Twinkle'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
100000 1 10 62516
output:
Twinkle
result:
ok single line: 'Twinkle'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
100 10 1 23 24 43 47 62 66 68 73 82 85
output:
Twinkle
result:
ok single line: 'Twinkle'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
100 10 3 11 18 23 26 30 40 52 76 78 99
output:
Twinkle
result:
ok single line: 'Twinkle'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
100 10 7 14 27 51 62 66 71 75 79 80 97
output:
Twinkle
result:
ok single line: 'Twinkle'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
100 10 10 10 18 25 50 51 54 64 77 95 96
output:
Twinkle
result:
ok single line: 'Twinkle'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
100 5 10 15 52 61 65 78
output:
Twinkle
result:
ok single line: 'Twinkle'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
10 10 1 1 2 3 4 5 6 7 8 9 10
output:
Nova
result:
ok single line: 'Nova'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
10 10 3 1 2 3 4 5 6 7 8 9 10
output:
Nova
result:
ok single line: 'Nova'
Test #14:
score: -100
Wrong Answer
time: 0ms
memory: 3680kb
input:
100 10 1 5 16 25 28 39 49 58 63 79 85
output:
Twinkle
result:
wrong answer 1st lines differ - expected: 'Nova', found: 'Twinkle'