QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#465819#9107. Zayin and Countgrass8cow#WA 14ms3592kbC++17615b2024-07-07 10:33:372024-07-07 10:33:37

Judging History

你现在查看的是最新测评结果

  • [2024-07-07 10:33:37]
  • 评测
  • 测评结果:WA
  • 用时:14ms
  • 内存:3592kb
  • [2024-07-07 10:33:37]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
char c[70];
int t1,t2,r1[13],r2[13],b1[13],b2[13];
void sol(){
    t1=t2=0;
    for(int i=0,a;i<10;i++){
        scanf("%d",&a);
        if(a)r1[i]=t1,b1[t1]=i,t1++;
    }
    for(int i=0,a;i<10;i++){
        scanf("%d",&a);
        if(a)r2[i]=t2,b2[t2]=i,t2++;
    }
    scanf("%s",c);__int128 x=0;int L=strlen(c);
    for(int i=0;i<L;i++)x=x*t1+r1[c[i]-'0'];
    L=0;
    while(x)
        c[L++]='0'+b2[x%t2],x/=t2;
    for(int i=L-1;i>=0;i--)putchar(c[i]);
    puts("");
}
int main(){
    int T;scanf("%d",&T);while(T--)sol();
    return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 14ms
memory: 3592kb

input:

10000
1 0 0 0 1 1 0 0 0 1
0 0 1 0 1 1 1 1 0 0
950595954440050004054505054050
1 0 0 0 1 1 1 1 0 0
1 1 1 0 1 0 0 0 1 1
45467007076660767550460064
1 1 1 1 0 0 0 1 0 0
1 1 0 1 1 0 1 0 0 1
23373171320213300170200722
0 0 0 0 1 1 1 0 1 0
0 0 1 0 0 1 0 1 1 1
558565664666565565558468668484
1 1 0 0 1 0 1 0 1 ...

output:

65266455722475422254727242
41990991999414091249949
101364364636933104003903
57259252998225997772927975
878555885282288227752558252252
610010606760761011770006661017
68888858668556558688868865568855558868
51566165566155616511615666156611165656
505885888775005550558080707878
3333916221911699323366319
...

result:

wrong answer 1st lines differ - expected: '52755244567262766742575722', found: '65266455722475422254727242'