QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#742326 | #9726. AUS | Microperson# | WA | 0ms | 3596kb | C++20 | 675b | 2024-11-13 16:22:42 | 2024-11-13 16:22:43 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N = 1000007;
ll arr[30][30];
void solve( ){
string a,b,c;
cin >>a >>b>> c;
if(a.length()!=b.length()){
cout<<"NO\n";
return;
}
if(a.length()!=c.length()){
cout<<"YES\n";
return;
}
int f=0;
int n=a.length();
for(int i=0;i<n;i++){
if(c[i]!=a[i]&&c[i]!=b[i]){
f=1;
break;
}
}
if(f==1){
cout<<"YES\n";
}else{
cout<<"NO\n";
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
ll T=1;
cin >> T;
while(T--){
solve();
}
}
/*
2 1
1 2 3 4
3 0
1 7 2 8 3 5 6 4
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3596kb
input:
4 abab cdcd abce abab cdcd abcd abab cdcd abc x yz def
output:
YES NO YES NO
result:
ok 4 lines
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3532kb
input:
10 ekkzjwextuoazxsosiiiditwrjiztfvxtzaztmdfhxroaqkjcdgsgiitkfglcrtgjquspjyjtodyhxetldbhvxampcvbinzgksxkunduhvbddakqswurshbnuazthfnxmsuyypznmxmatsnvpqovscnkkcjphtcmcsqteeikwggnugskjjwttvlrxmmrkyltxjhfiqicttcfumurdrmiqauruywgdomxxpbeunliyvsutrneexoyckjflhnmmaaovxubnptlemptxbhrflbnfcowktydgbugdxvkvegza...
output:
YES YES NO YES YES YES YES YES YES YES
result:
wrong answer 1st lines differ - expected: 'NO', found: 'YES'