QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#51522 | #4541. Black Magic | Amalgadon# | AC ✓ | 14ms | 3652kb | C++17 | 344b | 2022-10-02 16:03:47 | 2022-10-02 16:03:48 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
int T; cin>>T;
while(T--)
{
int E,L,R,B;
cin>>E>>L>>R>>B;
int e=E,l=L,r=R,b=B;
b=min(b,1);
if(l||r) b=0;
printf("%d ",e+b+l+r-min(l,r));
e=E,l=L,r=R,b=min(B,e+1);
printf("%d\n",e+l+r+b);
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 14ms
memory: 3652kb
input:
4000 0 0 0 1 0 0 0 100000 0 0 0 11 0 0 0 12 0 0 0 13 0 0 0 2 0 0 0 25 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 7 0 0 0 8 0 0 0 9 0 0 1 0 0 0 1 1 0 0 1 12 0 0 1 14 0 0 1 17 0 0 1 2 0 0 1 21 0 0 1 3 0 0 1 4 0 0 1 5 0 0 1 6 0 0 1 7 0 0 1 8 0 0 1 9 0 0 100000 0 0 0 11 6 0 0 12 3 0 0 12 4 0 0 13 0 0 0 13 12...
output:
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 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 100000 100000 11 12 12 13 12 13 13 13 13 14 13 14 14 15 16 16 16 17 16 17 2 2 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 26 27 3 3 3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4 4 4 4 5 ...
result:
ok 4000 lines