QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#780475 | #9750. 拼图 | Zpair# | WA | 2ms | 3936kb | C++20 | 358b | 2024-11-25 11:11:11 | 2024-11-25 11:11:14 |
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
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3884kb
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: 3936kb
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 4111th lines differ - expected: '6', found: '4'