QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#750318 | #9726. AUS | hhdhh# | WA | 0ms | 3624kb | C++23 | 848b | 2024-11-15 14:04:40 | 2024-11-15 14:04:40 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
#define debug(x) cout<<#x<<": "<<x<<endl
#define rep(i, a, b) for(int i = (a); i <= (b); i++)
#define per(i, a, b) for(int i = (a); i >= (b); i--)
#define sz(a) a.size()
#define all(a) a.begin(),a.end()
typedef pair<ll, ll> pll;
void solve()
{
string a, b, c;
cin >> a >> b >> c;
bool f = 1;
rep(i, 0, sz(c) - 1) {
if(c[i] != a[i] && c[i] != b[i]) {
f = 0;
break;
}
}
if((sz(a) != sz(b)) || (f && sz(c) == sz(a))) {
cout << "NO" << endl;
}
else {
cout << "YES" << endl;
}
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int T=1;
cin>>T;
while(T--)
{
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3612kb
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: 3624kb
input:
10 ekkzjwextuoazxsosiiiditwrjiztfvxtzaztmdfhxroaqkjcdgsgiitkfglcrtgjquspjyjtodyhxetldbhvxampcvbinzgksxkunduhvbddakqswurshbnuazthfnxmsuyypznmxmatsnvpqovscnkkcjphtcmcsqteeikwggnugskjjwttvlrxmmrkyltxjhfiqicttcfumurdrmiqauruywgdomxxpbeunliyvsutrneexoyckjflhnmmaaovxubnptlemptxbhrflbnfcowktydgbugdxvkvegza...
output:
YES YES NO YES YES YES YES YES YES YES
result:
wrong answer 1st lines differ - expected: 'NO', found: 'YES'