QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#762112#9629. 小 C 的神秘图形hongsedjingling#WA 1ms3572kbC++141.3kb2024-11-19 13:40:352024-11-19 13:40:35

Judging History

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

  • [2024-11-19 13:40:35]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3572kb
  • [2024-11-19 13:40:35]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define int long long 
const int N=20,mod=998244353;
int a[N];
void solve(){
    // memset(a,0,sizeof a);
    // for (int i=1;i<=9;i++) cin>>a[i];
    

    // int pp=min(a[1],a[2]);
    // a[1]-=pp;
    // a[2]-=pp;
    // a[3]+=pp;
    // a[2]+=a[1]/2;
    // a[1]%=2;
    // if (a[1]==1){
    //     for (int i=2;i<=12;i++){
    //         if (a[i]) {
    //             a[i]-=1;
    //             a[i+1]+=1;
    //             break;
    //         }
    //     }
    // }
    // int ans=1;
    // for (int i=2;i<=14;i++) 
    //     while (a[i]){
    //         a[i]--;
    //         ans*=i;
    //         ans%=mod;
    //     }
    // cout<<ans<<"\n";
    int n;cin>>n;
    string a,b;cin>>a>>b;
    for (int i=0;i<a.size()-1;i++)
    {
        if (a[i]=='2'||b[i]=='2'){
            cout<<"0\n";
            return;
        }
    }
    cout<<"1";
}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr),cout.tie(nullptr);
    // int T;cin>>T;
    // while (T--) 
    solve();
    return 0;
}

// 7
// 5 3 0 0 0 0 0 0 0
// 4 1 1 1 0 0 0 0 0
// 1 0 0 0 0 0 0 0 0
// 1 0 0 0 0 0 0 0 1
// 1 0 0 0 0 0 0 0 2
// 99 88 77 66 55 44 33 22 11
// 100 90 80 70 60 50 40 30 20

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3508kb

input:

96
122100012110202022211102020101110122101010001012220001000222210100222112111020002212000222012022
010112102102202201211121022102211110211010101020001021100101110202100010112221022001101222101102

output:

0

result:

ok single line: '0'

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3572kb

input:

100
2101120010010021010112120010111111212001120112101221211001111101012021111111211111110120002210111111
1010111101111111121211011101011101111111011201111110112110001211101110200102102020021011111121221102

output:

0

result:

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