QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#780488 | #9750. 拼图 | Zpair# | WA | 2ms | 3924kb | C++20 | 358b | 2024-11-25 11:14:10 | 2024-11-25 11:14:12 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void solve(){
int A,B,C,D;
scanf("%d%d%d%d",&A,&B,&C,&D);
if(A<4){
puts("0");
return;
}
int k1=min({B,C,D+1});
int k2=min({B,C,(D+4)/2});
int mx=max(k1*3-1+4,k2*4-4+4);
printf("%d\n",max(mx,4));
}
int main(){
int T;cin>>T;
while(T--)solve();
}
//4A kB kC (k-1)D
//4A kB kC (2k-4)D
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3752kb
input:
2 4 0 0 0 4 4 4 4
output:
4 16
result:
ok 2 lines
Test #2:
score: -100
Wrong Answer
time: 2ms
memory: 3924kb
input:
10000 0 0 0 0 0 0 0 1 0 0 0 2 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 2 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 2 0 0 0 2 1 0 0 2 2 0 0 2 3 0 0 2 4 0 0 2 5 0 0 2 6 0 0 2 7 0 0 2 8 0 0 2 9 0 0 3 0 0 0 3 1 0 0 3 2 0 0 3 3 0 0 3 4 0 0 3 5 0 0 3 ...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
wrong answer 4331st lines differ - expected: '10', found: '8'