QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#751118 | #9726. AUS | sdnuwy# | WA | 0ms | 3752kb | C++20 | 1.0kb | 2024-11-15 17:09:18 | 2024-11-15 17:09:19 |
Judging History
answer
//Think twice,code once.
#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define INF 0x3f3f3f3f3f3f3f
#define inf 0x3f3f3f3f
#define ff first
#define ss second
#define pii pair<int,int>
#define mem(i,n) memset(i,n,sizeof i)
#define dg(a) std::cout << #a << " = " << a << endl
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
void solve()
{
string s1,s2,s3;
cin >> s1 >> s2 >> s3;
int n=s1.size();
if(s2.size()!=n)
{
cout << "NO" << endl;
return;
}
if(s3.size()!=n)
{
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;
}
int32_t main()
{
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
int t = 1;
std::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: 3752kb
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: 3628kb
input:
10 ekkzjwextuoazxsosiiiditwrjiztfvxtzaztmdfhxroaqkjcdgsgiitkfglcrtgjquspjyjtodyhxetldbhvxampcvbinzgksxkunduhvbddakqswurshbnuazthfnxmsuyypznmxmatsnvpqovscnkkcjphtcmcsqteeikwggnugskjjwttvlrxmmrkyltxjhfiqicttcfumurdrmiqauruywgdomxxpbeunliyvsutrneexoyckjflhnmmaaovxubnptlemptxbhrflbnfcowktydgbugdxvkvegza...
output:
YES YES NO YES YES YES YES YES YES YES
result:
wrong answer 1st lines differ - expected: 'NO', found: 'YES'