QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#331590 | #5204. Football | Kevin5307# | WA | 1ms | 3700kb | C++23 | 1.4kb | 2024-02-18 15:36:12 | 2024-02-18 15:36:12 |
Judging History
answer
//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n,a,b;
cin>>n>>a>>b;
if(n==1)
{
cout<<(a==b)<<endl;
cout<<a<<":"<<b<<endl;
}
else
{
cout<<max(0,n-a-b)<<endl;
if(a>=n)
{
for(int i=1;i<=n-2;i++)
cout<<"1:0"<<endl;
a-=(n-2);
cout<<a<<":0"<<endl;
cout<<"0:"<<b<<endl;
}
else if(a+b>=n)
{
for(int i=1;i<=a;i++)
cout<<"1:0"<<endl;
for(int i=a+1;i<n;i++)
cout<<"0:1"<<endl;
cout<<"0:"<<b-(n-a-1)<<endl;
}
else
{
for(int i=1;i<=a;i++)
cout<<"1:0"<<endl;
for(int i=1;i<=b;i++)
cout<<"0:1"<<endl;
for(int i=1;i<=n-a-b;i++)
cout<<"0:0"<<endl;
}
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3576kb
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: 0ms
memory: 3700kb
input:
1 2 2
output:
1 2:2
result:
ok [1 2:2] 1 draws
Test #3:
score: 0
Accepted
time: 0ms
memory: 3552kb
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: 0ms
memory: 3576kb
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: 3528kb
input:
1 0 0
output:
1 0:0
result:
ok [1 0:0] 1 draws
Test #6:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
1 0 1000
output:
0 0:1000
result:
ok [1 0:1000] 0 draws
Test #7:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
1 1000 0
output:
0 1000:0
result:
ok [1 1000:0] 0 draws
Test #8:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
1 1000 1000
output:
1 1000:1000
result:
ok [1 1000:1000] 1 draws
Test #9:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
1 1000 999
output:
0 1000:999
result:
ok [1 1000:999] 0 draws
Test #10:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
1 999 1000
output:
0 999:1000
result:
ok [1 999:1000] 0 draws
Test #11:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
2 0 0
output:
2 0:0 0:0
result:
ok [2 0:0] 2 draws
Test #12:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
2 0 1
output:
1 0:1 0:0
result:
ok [2 0:1] 1 draws
Test #13:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
2 1 0
output:
1 1:0 0:0
result:
ok [2 1:0] 1 draws
Test #14:
score: 0
Accepted
time: 0ms
memory: 3576kb
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: 3636kb
input:
2 0 2
output:
0 0:1 0:1
result:
ok [2 0:2] 0 draws
Test #16:
score: -100
Wrong Answer
time: 1ms
memory: 3588kb
input:
2 2 0
output:
0 2:0 0:0
result:
wrong answer [2 2:0] promised 0 draws, but found 1