QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#859356 | #9726. AUS | Chief_Ning | WA | 0ms | 3712kb | C++14 | 2.0kb | 2025-01-17 17:46:21 | 2025-01-17 17:46:22 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define endl "\n"
#define For(l,r) for(int i=l;i<r;i++)
#define pq priority_queue<int>
#define yes void(cout << "YES" << endl)
#define no void(cout << "NO" << endl)
#define rep(i,a,n) for(int i=a;i<n;i++)
#define debug(x) cerr<<#x<<"="<<(x)<<"\n";
#define all(x) (x).begin(), (x).end()
const int INF = 0x3f3f3f3f;//无穷大
const int inf = 0xc0c0c0c0;//无穷小
const int MOD = 1;
const int N = 1;
inline int nxt() {
int x;
cin >> x;
return x;
}
/*
________ ___ ___ ___ _______ ________ ________ ___ ________ ________
|\ ____\|\ \|\ \|\ \|\ ___ \ |\ _____\\ ___ \|\ \|\ ___ \|\ ____\
\ \ \___|\ \ \\\ \ \ \ \ __/|\ \ \__/\ \ \\ \ \ \ \ \ \\ \ \ \ \___|
\ \ \ \ \ __ \ \ \ \ \_|/_\ \ __\\ \ \\ \ \ \ \ \ \\ \ \ \ \ ___
\ \ \____\ \ \ \ \ \ \ \ \_|\ \ \ \_| \ \ \\ \ \ \ \ \ \\ \ \ \ \|\ \
\ \_______\ \__\ \__\ \__\ \_______\ \__\ \ \__\\ \__\ \__\ \__\\ \__\ \_______\
\|_______|\|__|\|__|\|__|\|_______|\|__| \|__| \|__|\|__|\|__| \|__|\|_______|
*/
void ChiefNing()
{
string s1,s2,s3;
//1==2!=3
cin>>s1>>s2>>s3;
int n1=s1.size(),n2=s2.size(),n3=s3.size();
if(n1==n2&&n1!=n3){
yes;
return ;
}
if(n1!=n2){
no;
return ;
}
if(s1==s2&&s1!=s3){
yes;
return ;
}
map<char,char> mp;
for(char i='a';i<='z';i++)mp[i]=i;
for(int i=0;i<n1;i++){
if(s1[i]!=s2[i]){
mp[s1[i]]=s2[i];
}
}
for(auto &t:s3){
t=mp[t];
}
for(auto &t:s2){
t=mp[t];
}
for(auto &t:s1){
t=mp[t];
}
if(s1==s2&&s1!=s3)yes;
else no;
}
signed main(void)
{
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int _;
cin>>_;
while(_--)
ChiefNing();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
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: 0
Accepted
time: 0ms
memory: 3712kb
input:
10 ekkzjwextuoazxsosiiiditwrjiztfvxtzaztmdfhxroaqkjcdgsgiitkfglcrtgjquspjyjtodyhxetldbhvxampcvbinzgksxkunduhvbddakqswurshbnuazthfnxmsuyypznmxmatsnvpqovscnkkcjphtcmcsqteeikwggnugskjjwttvlrxmmrkyltxjhfiqicttcfumurdrmiqauruywgdomxxpbeunliyvsutrneexoyckjflhnmmaaovxubnptlemptxbhrflbnfcowktydgbugdxvkvegza...
output:
NO NO NO NO NO NO NO NO NO NO
result:
ok 10 lines
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3584kb
input:
100 dntfvviytogwqljvoksaovstrqwpovkncxvmytnvcaoikctmgukaxlivmwahenydtswyowpdvggeeyzykdiojltpxuzzwphdqfsh anbbtriynochhmrtsmjifvatlfsmwiimvxbmyoavcmfiioxatckaxcikmwazenjmdleyjwndvggqkazikdeofaqpbuzkupshfhgh anbflviytfylqlpvvmjaovajllwpoukmvwemgtivvaonkoxagukaxriyuvmypnymtdqyocpdvcgqkazykrihjbipxquzup...
output:
YES NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO YES NO NO NO YES NO YES NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES NO NO ...
result:
wrong answer 2nd lines differ - expected: 'YES', found: 'NO'