QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#109395 | #5204. Football | gigabuffoon# | WA | 2ms | 3544kb | C++20 | 1.1kb | 2023-05-28 21:30:04 | 2023-05-28 21:30:06 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void solve(int tc) {
int N, A, B; cin >> N >> A >> B;
if(N == 1) {
cout << (A == B) << '\n';
cout << A << ":" << B << '\n';
return;
}
if(A + B >= N) {
cout << 0 << '\n';
int idx = 0;
while(idx < N-2 and A)
cout << "1:0" << '\n', A--, idx++;
if(idx == N-2 and A)
cout << A << ":0" << '\n', A = 0, idx++;
while(idx < N-1 and B)
cout << "0:1" << '\n', B--, idx++;
if(idx == N-1 and B)
cout << "0:" << B << '\n', B = 0, B++;
return;
} else {
cout << N-A-B << '\n';
int idx = 0;
while(A) cout << "1:0" << '\n', A--, idx++;
while(B) cout << "0:1" << '\n', B--, idx++;
while(idx < N) cout << "0:0" << '\n', idx++;
return;
}
}
int main() {
ios::sync_with_stdio(false), cin.tie(0);
solve(0);
cout.flush(); return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3440kb
input:
3 2 4
output:
0 1:0 1:0 0:4
result:
ok [3 2:4] 0 draws
Test #2:
score: 0
Accepted
time: 2ms
memory: 3384kb
input:
1 2 2
output:
1 2:2
result:
ok [1 2:2] 1 draws
Test #3:
score: 0
Accepted
time: 0ms
memory: 3328kb
input:
4 0 7
output:
0 0:1 0:1 0:1 0:4
result:
ok [4 0:7] 0 draws
Test #4:
score: 0
Accepted
time: 2ms
memory: 3544kb
input:
6 3 1
output:
2 1:0 1:0 1:0 0:1 0:0 0:0
result:
ok [6 3:1] 2 draws
Test #5:
score: 0
Accepted
time: 0ms
memory: 3432kb
input:
1 0 0
output:
1 0:0
result:
ok [1 0:0] 1 draws
Test #6:
score: 0
Accepted
time: 2ms
memory: 3380kb
input:
1 0 1000
output:
0 0:1000
result:
ok [1 0:1000] 0 draws
Test #7:
score: 0
Accepted
time: 1ms
memory: 3500kb
input:
1 1000 0
output:
0 1000:0
result:
ok [1 1000:0] 0 draws
Test #8:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
1 1000 1000
output:
1 1000:1000
result:
ok [1 1000:1000] 1 draws
Test #9:
score: 0
Accepted
time: 2ms
memory: 3444kb
input:
1 1000 999
output:
0 1000:999
result:
ok [1 1000:999] 0 draws
Test #10:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
1 999 1000
output:
0 999:1000
result:
ok [1 999:1000] 0 draws
Test #11:
score: 0
Accepted
time: 1ms
memory: 3540kb
input:
2 0 0
output:
2 0:0 0:0
result:
ok [2 0:0] 2 draws
Test #12:
score: 0
Accepted
time: 1ms
memory: 3384kb
input:
2 0 1
output:
1 0:1 0:0
result:
ok [2 0:1] 1 draws
Test #13:
score: 0
Accepted
time: 2ms
memory: 3352kb
input:
2 1 0
output:
1 1:0 0:0
result:
ok [2 1:0] 1 draws
Test #14:
score: 0
Accepted
time: 1ms
memory: 3372kb
input:
2 1 1
output:
0 1:0 0:1
result:
ok [2 1:1] 0 draws
Test #15:
score: 0
Accepted
time: 0ms
memory: 3444kb
input:
2 0 2
output:
0 0:1 0:1
result:
ok [2 0:2] 0 draws
Test #16:
score: -100
Wrong Answer
time: 2ms
memory: 3300kb
input:
2 2 0
output:
0 2:0
result:
wrong output format Unexpected end of file - token expected