QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#471276#9107. Zayin and Countreal_sigma_team#WA 2ms3508kbC++231.2kb2024-07-10 20:16:402024-07-10 20:16:41

Judging History

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

  • [2024-07-10 20:16:41]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3508kb
  • [2024-07-10 20:16:40]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#ifdef lisie_bimbi
#else
#define endl '\n'
#endif
//#define int long long

#pragma GCC optimize("O2")


void solve(){
    int a1 = -1, a2 = -1, b1 = -1, b2 = -1;
    string _;
    cin >> _;
    for(int i = 0; i < 10; i++){
        int a = _[i] - '0';
        if(a){
            a = i;
        }
        if(a > a1){
            a2 = a1;
            a1 = a;
        }else if(a > a2){
            a2 = a;
        }
    }
    cin >> _; 
    for(int i = 0; i < 10; i++){
        int b = _[i] - '0';
        if(b){
            b = i;
        }
        if(b > b1){
            b2 = b1;
            b1 = b;
        }else if(b > b2){
            b2 = b;
        }
    }
    string s;
    cin >> s;
    for(auto i : s){
        if(i - '0' == a1){
            cout << b1;
        }else{
            cout << b2;
        }
    }
    cout << endl;
}

signed main(){
#ifdef lisie_bimbi
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);    
#endif     
    int t;
    cin >> t;
    while(t--){
        solve();
    }
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3508kb

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:

8
8
8
8
8
8
988898988888888888888888888888
8
8
8
8
8
8
88888888888888888888888888
8
8
8
8
8
8
88888888888888888888888888
8
8
8
8
8
8
888888888888888888888888888888
8
8
8
8
8
8
88888888888888888888888888
8
8
8
8
8
8
888888888888888888888888888888
8
8
8
8
8
8
888888888888888888888888888888
8
8
8
8
8
8...

result:

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