QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#742326#9726. AUSMicroperson#WA 0ms3596kbC++20675b2024-11-13 16:22:422024-11-13 16:22:43

Judging History

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

  • [2024-11-13 16:22:43]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3596kb
  • [2024-11-13 16:22:42]
  • 提交

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'