QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#21661 | #2850. 蛋糕 | JohnAlfnov# | WA | 69ms | 3640kb | C++20 | 551b | 2022-03-07 20:01:25 | 2022-05-08 03:47:33 |
Judging History
answer
#include<bits/stdc++.h>
#define mod 2148473648ll
using namespace std;
int main(){
int T;
cin>>T;
while(T--){
int a[5];
cin>>a[1]>>a[2]>>a[3]>>a[4];
long long an[10];
for(int i=0;i<=8;++i)an[i]=0;
for(int s=0;s<16;++s){
int x=s;
long long gs=1;
int he=0;
for(int i=1;i<=4;++i){
int ss=x&1;
x>>=1;
if(ss)++he,gs*=min(2,a[i]);
else gs*=a[i]-min(2,a[i]);
gs%=mod;
}
an[he]=(an[he]+gs)%mod;
}
for(int i=0;i<=8;++i)printf("%lld ",an[i]%mod);
putchar('\n');
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 69ms
memory: 3640kb
input:
9999 18429 66560 1 13694 48994 1 16287 10018 26028 52162 14916 1 30285 52396 33384 55269 65461 96967 74820 73364 55054 70162 1 1 97285 88897 39444 35439 61069 20048 35664 1 21838 22945 6244 79240 46316 82624 33318 31522 90387 93765 7568 97379 22273 74037 1255 91257 67961 28295 1 36263 20958 87638 59...
output:
0 278697304 483210476 394708 8 0 0 0 0 0 939058608 754824656 301172 8 0 0 0 0 0 928825136 750217032 372400 8 0 0 0 0 1239780156 506705424 73742516 1370608 16 0 0 0 0 1867092428 2145345144 1816812716 2484832 16 0 0 0 0 0 0 1713974672 250424 4 0 0 0 0 1222501394 1134629934 1413163092 2088456 16 ...
result:
wrong answer 1st lines differ - expected: '0 0 278697304 483210476 394708 8 0 0 0', found: '0 278697304 483210476 394708 8 0 0 0 0 '