用户输出
11
1 -5 1 -5 1 9 1 -5 1 -5 1
OvO You cannot see me!
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#24255 | #1145. ddd 和渡渡鸟 | Wrong Answer | 0 | 254 ms | 12176 K | C++ 11 / 1.1 K | YangDavid | 2020-04-23 10:19:41 |
#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
const int MAXN = 606060;
int in[MAXN][2], out[MAXN][2], val[MAXN];
int main() {
memset(in, -1, sizeof in);
memset(out, -1, sizeof out);
int a, b, ans, cloc = 0;
cin >> a >> b;
ans = a + b - gcd(a, b) - 1;
queue<int> q;
for (int i = 0; i <= ans; ++i) {
if (i + b <= ans)
out[i + b][0] = i, in[i][0] = i + b;
if (i - a >= 0)
out[i - a][1] = i, in[i][1] = i - a;
if (in[i][0] == -1 && in[i][1] == -1)
q.push(i);
}
while (!q.empty()) {
int u = q.front(), v;
q.pop();
val[u] = ++cloc;
if (out[u][0] != -1) {
v = out[u][0];
in[u][0] = out[u][0] = -1;
if (in[v][1] == -1)
q.push(v);
}
if (out[u][1] != -1) {
v = out[u][1];
in[v][1] = out[u][1] = -1;
if (in[v][0] == -1)
q.push(v);
}
}
printf("%d\n", ans);
for (int i = 1; i <= ans; ++i) printf("%d ", val[i] - val[i - 1]);
puts("\nOvO You cannot see me!");
return 0;
}
用户输出
11
1 -5 1 -5 1 9 1 -5 1 -5 1
OvO You cannot see me!
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
419
36 36 36 36 36 36 36 36 36 36 -385 36 36 36 36 36 36 36 36 36 36 36 -385 36 36 36 36 36 36 36 36
<1231 bytes omitted>
用户输出
419
36 36 36 36 36 36 36 36 36 36 -385 36 36 36 36 36 36 36 36 36 36 36 -385 36 36 36 36 36 36 36 36 36 36 36 -385 36 36 36 36 3
<1227 bytes omitted>
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
11223
3929 -7296 3929 3929 -7296 3929 3929 -7296 3929 3929 -7296 3929 3929 -7296 3929 3929 -7296 392
<59949 bytes omitted>
用户输出
11223
3929 -7296 3929 3929 -7296 3929 3929 -7296 3929 3929 -7296 3929 3929 -7296 3929 3929 -7296 3929 -7296 3929 3929 -7296 3929
<59945 bytes omitted>
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
174689
1 1 1 1 1 1 1 1 -46349 1 1 1 1 1 1 1 1 -46349 1 1 1 1 1 1 1 1 128350 1 1 1 1 1 1 1 1 -46349 1
<446330 bytes omitted>
用户输出
174689
1 1 1 1 1 1 1 1 -46349 1 1 1 1 1 1 1 1 -46349 1 1 1 1 1 1 1 1 128350 1 1 1 1 1 1 1 1 -46349 1 1 1 1 1 1 1 1 -46349 1 1 1
<446326 bytes omitted>
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
188827
1 -51075 1 -51075 1 137755 1 -51075 1 -51075 1 -51075 1 137755 1 -51075 1 -51075 1 -51075 1 1
<849626 bytes omitted>
用户输出
188827
1 -51075 1 -51075 1 137755 1 -51075 1 -51075 1 -51075 1 137755 1 -51075 1 -51075 1 -51075 1 137755 1 -51075 1 -51075 1 13
<849622 bytes omitted>
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
210661
1 -33215 1 -33215 1 -33215 1 -33215 1 -33215 1 177449 1 -33215 1 -33215 1 -33215 1 -33215 1 -
<947879 bytes omitted>
用户输出
210661
1 -33215 1 -33215 1 -33215 1 -33215 1 -33215 1 177449 1 -33215 1 -33215 1 -33215 1 -33215 1 -33215 1 177449 1 -33215 1 -3
<947875 bytes omitted>
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
366169
1 1 1 1 1 1 -102157 1 1 1 1 1 1 -102157 1 1 1 1 1 1 264020 1 1 1 1 1 1 -102157 1 1 1 1 1 1 -1
<1031507 bytes omitted>
用户输出
366169
1 1 1 1 1 1 -102157 1 1 1 1 1 1 -102157 1 1 1 1 1 1 264020 1 1 1 1 1 1 -102157 1 1 1 1 1 1 -102157 1 1 1 1 1 1 -102157 1
<1031503 bytes omitted>
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
399999
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
<799921 bytes omitted>
用户输出
399999
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
<799917 bytes omitted>
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
599997
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
<1199907 bytes omitted>
用户输出
599997
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
<1199903 bytes omitted>
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0
599997
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2
<1799902 bytes omitted>
用户输出
599997
-2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -
<1799898 bytes omitted>
Special Judge 信息
Wrong Answer | Output contains extra tokens
系统信息
Exited with return code 0