QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#784949 | #9726. AUS | Proaes | WA | 0ms | 3812kb | C++17 | 827b | 2024-11-26 16:24:48 | 2024-11-26 16:24:49 |
Judging History
answer
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
using ll = long long;
void solve()
{
string s1, s2, s3;
cin >> s1 >> s2 >> s3;
int n = min({s1.size(), s2.size(), s3.size()});
if (s1.size() != s2.size())
{
cout << "NO" << endl;
return;
}
if (s3.size() != s1.size())
{
cout << "YES" << endl;
return;
}
for (int i = 0; i < n; i++)
{
if (s3[i] != s1[i] && s3[i] != s2[i])
{
cout << "YES" << endl;
return;
}
}
cout << "NO" << endl;
}
int main()
{
#ifdef x3ea
freopen("in.txt", "r", stdin);
#endif
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
int _ = 1;
cin >> _;
for (; _; _--)
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3812kb
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: 3784kb
input:
10 ekkzjwextuoazxsosiiiditwrjiztfvxtzaztmdfhxroaqkjcdgsgiitkfglcrtgjquspjyjtodyhxetldbhvxampcvbinzgksxkunduhvbddakqswurshbnuazthfnxmsuyypznmxmatsnvpqovscnkkcjphtcmcsqteeikwggnugskjjwttvlrxmmrkyltxjhfiqicttcfumurdrmiqauruywgdomxxpbeunliyvsutrneexoyckjflhnmmaaovxubnptlemptxbhrflbnfcowktydgbugdxvkvegza...
output:
YES YES NO YES YES YES YES YES YES YES
result:
wrong answer 1st lines differ - expected: 'NO', found: 'YES'