QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#661961 | #4430. Hidden Password | kirco | AC ✓ | 0ms | 4292kb | C++23 | 739b | 2024-10-20 19:29:10 | 2024-10-20 19:29:11 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
#define endl "\n"
#define iosy ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(i,a,n) for(int i=a;i<=n;i++)
#define rop(i,a,n) for(int i=a;i<n;i++)
using namespace std;
const int inf = 0x3f3f3f3f3f3f3f3fLL;
const int N = 2e5+10;
const int MOD = 1e9+7;
string shift(string s){
string res(s.size(),' ');
for(int i=0;i<s.size();i++){
res[i]=(s[i]-'a'+13+26)%26+'a';
}
return res;
}
void solve(){
string s;cin>>s;
// if(s.size()==1){
// cout<<"NIE\n";
// return;
// }
string ans=shift(s);
if(shift(ans)==s)cout<<ans<<"\n";
else cout<<"NIE\n";
}
signed main(){
iosy;
int _t=1;
cin>>_t;
while(_t--){
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 4292kb
input:
20 aeljltfjjqdplqkoevfocfopmigcwtdkehcbrrjrukkjnaozzbpxaiusphivkjbyqqwxyngvkczgilniutalgskhpbcpmwdbjdekkihyuoteiurjvhgixsehjxtqugjzwelxmjqbunoyofvgsomzwrsjrddrmjebpovwebpzmmdbgghyisvqlwalutpffxvypxfphdmnudyjdjsnyhgctmhpzmayzjodaezeoxgkuioqiquffjzndmdqsdjuxlyrviisvczkxeyhpxejksmtohxcfkghsiiiyiliehmks...
output:
nrywygswwdqcydxbrisbpsbczvtpjgqxrupoeewehxxwanbmmocknvhfcuvixwolddjklatixpmtvyavhgnytfxucopczjqowqrxxvulhbgrvhewiutvkfruwkgdhtwmjrykzwdohablbsitfbzmjefweqqezwrocbijrocmzzqottulvfidyjnyhgcsskilckscuqzahqlwqwfalutpgzucmznlmwbqnrmrbktxhvbdvdhsswmaqzqdfqwhkyleivvfipmxkrluckrwxfzgbukpsxtufvvvlvyvruzxfbsw...
result:
ok 20 lines
Extra Test:
score: 0
Extra Test Passed