QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#147050 | #3900. Crossed out letter | OneWan | AC ✓ | 4ms | 5540kb | C++20 | 1.3kb | 2023-08-22 18:58:07 | 2023-08-22 18:58:08 |
Judging History
answer
// Problem: C - Crossed out letter
// Contest: Virtual Judge - Namomo Summer Camp 23 Day 2
// URL: https://vjudge.net/contest/576885#problem/C
// Memory Limit: 254 MB
// Time Limit: 1000 ms
#include <bits/stdc++.h>
using namespace std;
// 2023 OneWan
int cnt[28];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string a, b;
cin >> a >> b;
int n = a.size();
if (a == b) {
cout << a << "a";
} else if (n == 1) {
cout << a << b;
} else {
int pos;
for (int i = 0 ; i < n ; i++) {
if (a[i] != b[i]) {
pos = i;
break;
}
}
string ta = a.substr(0, pos) + b[pos] + a.substr(pos);
string tb = b.substr(0, pos) + a[pos] + b.substr(pos);
pos = -1;
for (int i = 0 ; i < n ; i++) {
if (ta[i] != b[i]) {
pos = i;
break;
}
}
if (pos == -1) {
cout << ta;
return 0;
}
string sb = b.substr(0, pos) + ta[pos] + b.substr(pos);
if (ta == sb) {
cout << ta;
return 0;
}
pos = -1;
for (int i = 0 ; i < n ; i++) {
if (tb[i] != a[i]) {
pos = i;
break;
}
}
if (pos == -1) {
cout << tb;
return 0;
}
string sa = a.substr(0, pos) + tb[pos] + a.substr(pos);
if (tb == sa) {
cout << tb;
return 0;
}
cout << "IMPOSSIBLE";
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3644kb
input:
abacaa aacaba
output:
abacaba
result:
ok 42.
Test #2:
score: 0
Accepted
time: 2ms
memory: 3804kb
input:
bsuir openx
output:
IMPOSSIBLE
result:
ok impossible
Test #3:
score: 0
Accepted
time: 1ms
memory: 3640kb
input:
addcdbbba ddcdbbbac
output:
addcdbbbac
result:
ok 42.
Test #4:
score: 0
Accepted
time: 1ms
memory: 3644kb
input:
ddaddbdab ddadbddab
output:
ddadbdbdab
result:
ok 42.
Test #5:
score: 0
Accepted
time: 1ms
memory: 3528kb
input:
bacbcbbab bccbabbab
output:
IMPOSSIBLE
result:
ok impossible
Test #6:
score: 0
Accepted
time: 1ms
memory: 3876kb
input:
untmvnmfocjyaafqrzm untmvnmfojyaafqrzmd
output:
untmvnmfocjyaafqrzmd
result:
ok 42.
Test #7:
score: 0
Accepted
time: 1ms
memory: 3652kb
input:
ozedolrcxugjtdynuzu ozlcoercxugjtdynuzu
output:
IMPOSSIBLE
result:
ok impossible
Test #8:
score: 0
Accepted
time: 1ms
memory: 3640kb
input:
fpmnvtyhezkicyepxneywwoxmgqhijkkgbffrlkgdeqzflcjyqnkbtamsltqyygjsjzleboybnjnobgjlbfzfviogdyexzvkggs fpmnvtyhezkicyepxneywwoxmgqhijkkgbffrlkgdeqflcjyqnkbtamsltqyygjsjzleboybnjnobgjlbfzfvoiogdyexzvkggs
output:
fpmnvtyhezkicyepxneywwoxmgqhijkkgbffrlkgdeqzflcjyqnkbtamsltqyygjsjzleboybnjnobgjlbfzfvoiogdyexzvkggs
result:
ok 42.
Test #9:
score: 0
Accepted
time: 1ms
memory: 3612kb
input:
xdyecuxttxvojqeyskroupnolcvdqopztvwrwfxdtbhtnbwzrrewdcwmyausobigdzniqodvescgwnhhdkgmngwthkujfedqbhe xdyecuxbtxvojqeyskoupnolcvdqopztvwrwfxdtbhtnbwzrrewdfcwmyausotigdzniqodvescgwnhhdkgmngwthkujfedqbhe
output:
IMPOSSIBLE
result:
ok impossible
Test #10:
score: 0
Accepted
time: 1ms
memory: 3884kb
input:
bqhgozzcohceyxjaclkocadaudqvpbcbqrbjknytqxbbnnyluvvqdwflchvrmfhhgmiqiwmqejshmshetebdzwdxppblpwzfhojsmopkbztegxgqkpednfllpqmjfkuwqfojbzrjhainsfjfcfscbiexzsinzrsgnjzhjwxbcihltegppevehhemmjwjfwmhdcufwjpqobpenbezdsjhtedokaoxidyovyreiqtlgimvgmrhcyzmxjeqgfwsfiijqcvcavopinlnyoptuwtnkezdpupshseuweshwcmtwwic...
output:
bqhgozzcohceyxjaclkocadaudqvpbcbqrbjknytqxbbnnyluvvqdwflchvrmfhhgmiqiwmqejshmshetebdzwdxppblpwzfhojsmopkbztegxgqkpednfllpqmjfkuwqfojbzrjhainsfjfcfscbiexzsinzrsgnjzhjwxbcihltegppevehhemmjwjfwmhdcufwjpqobpenbezdsjhtedokaoxidyovyreiqtlgimvgmrhcyzmxjeqgfwsfiijqcvcavopinlnyoptuwtnkezdpupshseuweshwcmtwwic...
result:
ok 42.
Test #11:
score: 0
Accepted
time: 1ms
memory: 3592kb
input:
wcsxvzwmbeokfqhixjxeasctuzurxghoeltxphkqfuruvdrbnwmagkfvvtcvgwdguhhsmlmvybayelocniglhmtjsrihteemnjkehdmomuootktcmboswrznyczrybivjaykdzpmcsswbqrbrofzejjgixqxobixycgndwboubsuxcocsqinobbkeoyvrjqgksouffhhxxxerksfqidmrycmflkblakraznjqknrcaobcihwinzoqlkuemmeawndyegzxcrsbpegpcyrynhwtfphylpmlgutnavvgaovtuml...
output:
wcsxvzwmbeokfqhixjxeasctuzurxghoeltxphkqfuruvdrbnwmagkfvvtcvgwdguhhsmlmvybayelocniglhmtjsrihteemnjkehdmomuootktcmboswrznyczrybivjaykdzpmcsswbqrbrofzejjgixqxobixycgndwboubsuxcocsqinobbkeoyvrjqgksouffhhxxxerksfqidmrycmflkblakraznjqknrcaobcihwinzoqlkuemmeawndyegzxcrsbpegpcyrynhwtfphylpmlgutnavvgaovtuml...
result:
ok 42.
Test #12:
score: 0
Accepted
time: 1ms
memory: 3880kb
input:
aaaccbababbaccbccccaccbcbaccbbcbcaabaccbbbcbccbaaaaabccbcaacbabbcbbacccbcacccaacaaccabbaacccaabaccbbcabcaccbbaaccbcbbabbcbbbccaaabcccbbbcaabbabcacccbbcabbcabcbbcabbbccbcbbbbaacccaacaccabcbcaabcbaaccaabbcaabcabaaacaabaccabbbaaccbbcaaabbabacaaabbacacbbccbaaccbccbaaaaaabcacbcaaababcbbbcbccabaacaabacabc...
output:
aaaccbababbaccbccccaccbcbaccbbcbcaabaccbbbcbccbaaaaabccbcaacbabbcbbacccbcacccaacaaccabbaacccaabaccbbcabcaccbbaaccbcbbabbcbbbccaaabcccbbbcaabbabcacccbbcabbcabcbbcabbbccbcbbbbaacccaacaccabcbcaabcbaaccaabbcaabcabaaacaabaccabbbaaccbbcaaabbabacaaabbacacbbccbaaccbccbaaaaaabcacbcaaababcbbbcbccabaacaabacabc...
result:
ok 42.
Test #13:
score: 0
Accepted
time: 1ms
memory: 3640kb
input:
bcbbbcbcabbababaababaccabacacbcbcbaccbbbbccaacbbcacccaccbcbbccccbbcbbbbcabbbcbbbabaaccbccaaaabcacaacabcbabbbbccbbabcbcabbccbcbbaccbbacbbccccabaccbabbccaabcbcaaccccabbcbcbaacaabcbccbcccacbcacbcbaccabbccbbbaabbcccabcbccaaabaabccabccccbbcabbcaccacaaababcbbbbaccababbcaabccbcaaccacbccbabcacbbcabcacaacccc...
output:
bcbbbcbcabbababaababaccabacacbcbcbaccbbbbccaacbbcacccaccbcbbccccbbcbbbbcabbbcbbbabaaccbccaaaabcacaacabcbabbbbccbbabcbcabbccbcbbaccbbacbbccccabaccbabbccaabcbcaaccccabbcbcbaacaabcbccbcccacbcacbcbaccabbccbbbaabbcccabcbccaaabaabccabccccbbcabbcaccacaaababcbbbbaccababbcaabccbcaaccacbccbabcacbbcabcacaacccc...
result:
ok 42.
Test #14:
score: 0
Accepted
time: 0ms
memory: 5428kb
input:
llysnsrzpvwrummcdulphzepzmvwtnapzduhwhmxnowlzaxrcotgztmhaizduojniinepgmmbryurhtegpxnvmmcpojcmlkmhyvzstpgyidtbxcirmzbculrkarllziclgefniptwhnsthemgiftlqgrxewuqgkgusafbgjcjkyjmnzszdrwtnneelhpfphyiyymwhvrxoocujlkgieverpnjqpecuiubkyfanxwhotgqpxerwuersvezotsyolkpkyfxtfjxrshspzisftmxhlkqdhpxvaekgaehmjofjrt...
output:
llysnsrzpvwrummcdulphzepzmvwtnapzduhwhmxnowlzaxrcotgztmhaizduojniinepgmmbryurhtegpxnvmmcpojcmlkmhyvzstpgyidtbxcirmzbculrkarllziclgefniptwhnsthemgiftlqgrxewuqgkgusafbgjcjkyjmnzszdrwtnneelhpfphyiyymwhvrxoocujlkgieverpnjqpecuiubkyfanxwhotgqpxerwuersvezotsyolkpkyfxtfjxrshspzisftmxhlkqdhpxvaekgaehmjofjrt...
result:
ok 42.
Test #15:
score: 0
Accepted
time: 3ms
memory: 5428kb
input:
fyljuspjcqkwchkkyryihqdjyiavdtfcnxlvbyzselnehqrjvsisbimrsuhhngemwdnesvmruigjhdzczteuddcpsrqapvovnuylpgnkjbycolnvtxlqkezstncsdqwagbogpkovrauaerlfvstsnpkcgjecfoavejijxgnpzditrkjfcpgfchkdwslbsclyontcgdnigjvewsarvzxccnomhdikepsvgkwhhfrcbgsmkmmvzjugkubiuvlctbrexmleuzimqslyjdhgvwhsgibqywjhzjrbcddsrklqcivz...
output:
IMPOSSIBLE
result:
ok impossible
Test #16:
score: 0
Accepted
time: 4ms
memory: 5172kb
input:
babbabacaaabacbabacacccbbbbbacbbacbcbbcaabccccccccbabaccbbccababbaccaccaccaccccccccbaccabcbbbbbaaaacbaacbcccabccbbcaccbabccaaacccaaccacccbabcbcaaabaabccaccbaaaabcbcabcacccccaacbbcbacacaccaccbccbabaccbacabcaaabbcacaacbccbbcacabbbcaabcbcbaacccacbbccbacacacabcaaacabacacbccaccbaabcaccaaccacbcaabbbbcaaab...
output:
babbabacaaabacbabacacccbbbbbacbbacbcbbcaabccccccccbabaccbbccababbaccaccaccaccccccccbaccabcbbbbbaaaacbaacbcccabccbbcaccbabccaaacccaaccacccbabcbcaaabaabccaccbaaaabcbcabcacccccaacbbcbacacaccaccbccbabaccbacabcaaabbcacaacbccbbcacabbbcaabcbcbaacccacbbccbacacacabcaaacabacacbccaccbaabcaccaaccacbcaabbbbcaaab...
result:
ok 42.
Test #17:
score: 0
Accepted
time: 0ms
memory: 5204kb
input:
cccccaaaccacaabaacabbbbcbccbabbccacaccbbcccacacbbcaccbccaaababbcacaabbbbbaacccabcbaccacaaacaacababcbcbcbbcabbccbaaabaaacbaacbcabcccbabccbaacbbcabccaccbcccccbbbabcacacabcbbaacacaabacaaccaacababaaaabbbacbacccbbaababbcaabacabaabacbcbcabbababcabbbbcbbabaabbbcabccaaacbbcacbbabbaaccaacbaacbbacaabbaaccbabb...
output:
cccccaaaccacaabaacabbbbcbccbabbccacaccbbcccacacbbcaccbccaaababbcacaabbbbbaacccabcbaccacaaacaacababcbcbcbbcabbccbaaabaaacbaacbcabcccbabccbaacbbcabccaccbcccccbbbabcacacabcbbaacacaabacaaccaacababaaaabbbacbacccbbaababbcaabacabaabacbcbcabbababcabbbbcbbabaabbbcabccaaacbbcacbbabbaaccaacbaacbbacaabbaaccbabb...
result:
ok 42.
Test #18:
score: 0
Accepted
time: 1ms
memory: 3644kb
input:
fhbk fmhb
output:
fmhbk
result:
ok 42.
Test #19:
score: 0
Accepted
time: 3ms
memory: 4656kb
input:
zvzqermoyfappvywsvzwfittkhwhmvyrpswgviujoavdinwumcmrobivvumgdhjcsvnnksvhnbrbrerfzaefjbktxedbvdzjrhboecmapqzgjxhwymfmjkrbzzrjsltfytskwfelvtanhpzmmrsxgrbyaxkmttfrfwpigwhfseftefghziliweobjqptigavtqmrlswypyiorloiwqtblpmtahzltnjpgmvjoriztuwdowkckbyivemdsxgyekswvdwhqqzxvsmtffbqrqodqlwnwhhrumueubsgccjeptoo...
output:
zvzqermoyfappvywsvzwfittkhwhmvyrpswgviujoavdinwumcmrobivvumgdhjcsvnnksvhnbrbrerfzaefjbktxedbvdzjrhboecmapqzgjxhwymfmjkrbzzrjsltfytskwfelvtanhpzmmrsxgrbyaxkmttfrfwpigwhfseftefghziliweobjqptigavtqmrlswypyiorloiwqtblpmtahzltnjpgmvjoriztuwdowkckbyivemdsxgyekswvdwhqqzxvsmtffbqrqodqlwnwhhrumueubsgccjeptoo...
result:
ok 42.
Test #20:
score: 0
Accepted
time: 3ms
memory: 5424kb
input:
lidjrywjsyqztcjahlejxvmemnkqardxgcfmziwkylklpibedwlnhkyilosnjbtcmxtgptsxriwwsjsflhhghygwarhcdwlsxuhpzqyodrwgwfdmmomqvviorgegtwccgttwijituufmvvyjfbcqaugrujvxyaqglscmfswlkntydxfmazctklpktpgbqifozawqubnjlrjijlanekocjsnoiicohgxvxlvvxekyzqvvhuphwmwxawcrccnzhbgncrhdzxrozalvrwbccjltjxsgdhfhqdzmsnrdstewnizc...
output:
lidjrywjsyqztcjahlejxvmemnkqardxgcfmziwkylklpibedwlnhkyilosnjbtcmxtgptsxriwwsjsflhhghygwarhcdwlsxuhpzqyodrwgwfdmmomqvviorgegtwccgttwijituufmvvyjfbcqaugrujvxyaqglscmfswlkntydxfmazctklpktpgbqifozawqubnjlrjijlanekocjsnoiicohgxvxlvvxekyzqvvhuphwmwxawcrccnzhbgncrhdzxrozalvrwbccjltjxsgdhfhqdzmsnrdstewnizc...
result:
ok 42.
Test #21:
score: 0
Accepted
time: 0ms
memory: 5160kb
input:
vxdglfzgxtznwiqpokgxhsjpgmefjjsvhdqeukypebifvxkluklpobjydarynjfvueezeaichsoegiraspdgmmqirvqljjgshdwkqrzfkmngnaontxlghbxhrguqsgljouxjrvagqbehnfnynykduhzawdbningmhdtzxmcvhipvwzfnxoyspyaditmknzmtcnpiaxphrdyomisgmcbesipubeewqkzhdmiuiagyjghfsvhkosjcwxrbuznnetjwmyusojutccdzeyxgmwrytlymfewxfhqmezkefjqqtjgv...
output:
IMPOSSIBLE
result:
ok impossible
Test #22:
score: 0
Accepted
time: 1ms
memory: 4876kb
input:
bcbbbcbaaacabcaaaabababbabbbcbbabbabbcbbaaaccaaaacaaacabcbcccacbcbcbbacaaacacbaabcbbbccacabbacaccbabbbcbcabaabbbbcbccbcbcbcbaaababbbbbacaabcbccbccbbaaacacacaabccccabaacbabcaaacacbaccbaabacacbabacbccaaccaaccbbcacabcacaacbbbaabbcacabacaabcbabaabbbabccabacbbcabababbbaacbaacacbccccccccbabbbbcabbacbacaab...
output:
bcbbbcbaaacabcaaaabababbabbbcbbabbabbcbbaaaccaaaacaaacabcbcccacbcbcbbacaaacacbaabcbbbccacabbacaccbabbbcbcabaabbbbcbccbcbcbcbaaababbbbbacaabcbccbccbbaaacacacaabccccabaacbabcaaacacbaccbaabacacbabacbccaaccaaccbbcacabcacaacbbbaabbcacabacaabcbabaabbbabccabacbbcabababbbaacbaacacbccccccccbabbbbcabbacbacaab...
result:
ok 42.
Test #23:
score: 0
Accepted
time: 0ms
memory: 5152kb
input:
ccaacbaacbaabaabbbacabcbbcbaaaabbacccaacbccacbcbacbbabacbcabbbacbbccbcaaaabaaccababbcbccbccbcaaaabbcccbacabcbbacccabbbcaaababcccbccbbaaaacbcbacacabaaacbabbaaaacbabaaabcccaaccaccbaccbaccabbabaabaabbaaaabbaacaacaaaaabcccbacbccccbbacacabbabcbabacbbaacaccaabbbcaabbbbababbbbcabaacaacaacaacbacabcbcabaaabb...
output:
ccaacbaacbaabaabbbacabcbbcbaaaabbacccaacbccacbcbacbbabacbcabbbacbbccbcaaaabaaccababbcbccbccbcaaaabbcccbacabcbbacccabbbcaaababcccbccbbaaaacbcbacacabaaacbabbaaaacbabaaabcccaaccaccbaccbaccabbabaabaabbaaaabbaacaacaaaaabcccbacbccccbbacacabbabcbabacbbaacaccaabbbcaabbbbababbbbcabaacaacaacaacbacabcbcabaaabb...
result:
ok 42.
Test #24:
score: 0
Accepted
time: 3ms
memory: 5144kb
input:
baacaccbaabacacbbbcacbbabaabacacbacacaabbaccbbcaacaaacbabcccbcbaccaaccbaabacaabbbbccacccbcbabaacbbbbcaaaccabbccbbbccccbaacccbbbcaaccbcccbbabcbacaababcbcbcabcbabcccbacabbcabcbcbbaaaacbcaabbacbbaabbabbcccccbaabacacbcacbbbbcbbbacabacabababccbbbababaabcbacabaaaabcacbacababbbbccbcbbabcbccbbacbbbbaaabcaca...
output:
baacaccbaabacacbbbcacbbabaabacacbacacaabbaccbbcaacaaacbabcccbcbaccaaccbaabacaabbbbccacccbcbabaacbbbbcaaaccabbccbbbccccbaacccbbbcaaccbcccbbabcbacaababcbcbcabcbabcccbacabbcabcbcbbaaaacbcaabbacbbaabbabbcccccbaabacacbcacbbbbcbbbacabacabababccbbbababaabcbacabaaaabcacbacababbbbccbcbbabcbccbbacbbbbaaabcaca...
result:
ok 42.
Test #25:
score: 0
Accepted
time: 3ms
memory: 5384kb
input:
abaacabbacbababbabcabaababcbcbbabbabbccacbabbaaccbaccacbbcbcaaacbaabbbacbaccccaacbcbcbbabcbbcacbbccabcbbbcacacbabaacbbcbbbccbbcabaacbbcaabaaabbccacccbcaccbcaaabcbbbbacbabcacccbcacacbbbbabcaabacaaccaacbcbacbbaabcbbcaaccaaccbcbbacbcabcbcbaacbccbbaabbcbaabccabbbabbacbccabcccaaccbabbccbabcacbbaabbcbaaaa...
output:
IMPOSSIBLE
result:
ok impossible
Test #26:
score: 0
Accepted
time: 0ms
memory: 5068kb
input:
eeabcdaafcfecdacdcabfeebebeffdbadbacbdbeecbffcefeebddcccaefdffaebbfbcabadcecbdaafeccdbcaffafbafaccedeaffdfcfcbecdfdffacaaeaabeffbdeedeebeeefdbebfeeddbddedadffdeeafcedbabfcabaacedfcddbcfccffbebbbcbafbefaaeebcaefcfedabecfeeebbfdafadebcaebfedbcbcbeddaaecfdaedbaeedcdcbffcdcaddffadcacbdbdeccababdddddbeca...
output:
eeabcdaafcfecdacdcabfeebebeffdbadbacbdbeecbffcefeebddcccaefdffaebbfbcabadcecbdaafeccdbcaffafbafaccedeaffdfcfcbecdfdffacaaeaabeffbdeedeebeeefdbebfeeddbddedadffdeeafcedbabfcabaacedfcddbcfccffbebbbcbafbefaaeebcaefcfedabecfeeebbfdafadebcaebfedbcbcbeddaaecfdaedbaeedcdcbffcdcaddffadcacbdbdeccababdddddbeca...
result:
ok 42.
Test #27:
score: 0
Accepted
time: 3ms
memory: 5280kb
input:
eecfcbdabecdbecdacafebdfcdecdcbcbcfaffaedeeedbbdaddcacadadebeddbeecbebeebbdbdcfcedfecdbbfcfcbdbefcebafddceecfdaaaaeadedddaadeeedaabbacfcdbfabeeeebffeafbdbdcaedbbcabbedabecaaedeeacadcbedfeefcaacfbabdbbaafeadecdddbedfabafcbefdeadebdfedfebddfbaafcddbdffeaeeaeefcccbfcddacbeefefaacebfbeaaebdcaffccbfeecba...
output:
IMPOSSIBLE
result:
ok impossible
Test #28:
score: 0
Accepted
time: 3ms
memory: 5288kb
input:
ddbhdefadegegedfggbabcbbeabbdhbghbdgegfdaadgbehhcfaaafaecghhdcccaacefgeabcccfdadfefahgahacbcafeafgdffghhdgeffcbgfhcagcbdcaeghaacgfccaaehddaddgbafffggaegechfhhecdhcgbfefecchhhhgceaaebefebccdddahcbbhdahegeaffgfbfghefdeefbdbdbggghhadbabcacccefbhhedechdhbgcfagccbhcbcafdebahhcbagdefcebgbdbeaehecagccgbbce...
output:
ddbhdefadegegedfggbabcbbeabbdhbghbdgegfdaadgbehhcfaaafaecghhdcccaacefgeabcccfdadfefahgahacbcafeafgdffghhdgeffcbgfhcagcbdcaeghaacgfccaaehddaddgbafffggaegechfhhecdhcgbfefecchhhhgceaaebefebccdddahcbbhdahegeaffgfbfghefdeefbdbdbggghhadbabcacccefbhhedechdhbgcfagccbhcbcafdebahhcbagdefcebgbdbeaehecagccgbbce...
result:
ok 42.
Test #29:
score: 0
Accepted
time: 3ms
memory: 5300kb
input:
bcaahefebebhgeadagcfaaaafgeggceebachgaecddcedfadcfeffeffacgecdfbbgdehdfdfgbfhehhcahegddgcedhegdacaaagbdhddfgbfbfbccehagcfhbfegfefhcachgcfcgacaedcgbdcfghghagfgdcccbdbedfbghhbghdcgfhcbhchagahebaaedgbfchbdfccgddcdccbghebbhgffddddcabcfddgdecfhabhgdedefhacegabcaeggfcdafcddebadhghcbaffbfdccfcffbhgdafdgheb...
output:
IMPOSSIBLE
result:
ok impossible
Test #30:
score: 0
Accepted
time: 3ms
memory: 5328kb
input:
ajehbadjeijacefehagchcggcdjecahehffhffcibffhbjfdiaiiigahbeebjdhhjjdaccbgbjhbbachicfgbifbabfahabbfbfdjhdcahafigibhhgeghijfgfgedghicjhbfaiffjibfhbjfahaggacbadfiaiehjggbjffchiibgebbbghdhfefjijgifieddhffcjhbdhgjhhcadfheefbfcgcbedefjjgajcejgeiijejibhdiigcabhddedaijfdfbceahfejgaeebehfijbhchgjefdadcdhjgchc...
output:
ajehbadjeijacefehagchcggcdjecahehffhffcibffhbjfdiaiiigahbeebjdhhjjdaccbgbjhbbachicfgbifbabfahabbfbfdjhdcahafigibhhgeghijfgfgedghicjhbfaiffjibfhbjfahaggacbadfiaiehjggbjffchiibgebbbghdhfefjijgifieddhffcjhbdhgjhhcadfheefbfcgcbedefjjgajcejgeiijejibhdiigcabhddedaijfdfbceahfejgaeebehfijbhchgjefdadcdhjgchc...
result:
ok 42.
Test #31:
score: 0
Accepted
time: 3ms
memory: 5304kb
input:
hffhbaidjaehfhgdfeceehiaiadbajaeecaaifbdihegbiijagccjdegjabacbcbdbeighehjfgabjhdjdjeihbeaaehiibbaadhbgceciedjeedeefbfhfajajcaebbhhhiahjcfecbhjbeadejgiachgeaabafdhafdcdidjabfaegjgaefeddaigfifebcgaaeddeehgbddadgffjcbhbadjjagehajiiicffejhjjhhhacigefiebhgejjjdcagbdfficgjaaebjcedddaeihagajehifbchddbghbag...
output:
IMPOSSIBLE
result:
ok impossible
Test #32:
score: 0
Accepted
time: 1ms
memory: 4984kb
input:
kacghbeafkgfggdbjcdiikeaejahibeidfbkfjdhcagigiiihehibhgfkgjcagdiibhicafkhebaefgdibbcfghdgaibkfibbhkdeaijjagdcigkkbadhbddeejchiehjgcdkigkefkeaadgidfjbcfbdachikfdckigkhaeaacjcgddbkdjbigkjjbhdhefchikibkidiaejehkjdhfbhiicbcfaahgdgfijgjejghegihefaeahibfakejkkhidghidggefeejkiegifegcbfefkeeadhbbdgaeegdaejk...
output:
kacghbeafkgfggdbjcdiikeaejahibeidfbkfjdhcagigiiihehibhgfkgjcagdiibhicafkhebaefgdibbcfghdgaibkfibbhkdeaijjagdcigkkbadhbddeejchiehjgcdkigkefkeaadgidfjbcfbdachikfdckigkhaeaacjcgddbkdjbigkjjbhdhefchikibkidiaejehkjdhfbhiicbcfaahgdgfijgjejghegihefaeahibfakejkkhidghidggefeejkiegifegcbfefkeeadhbbdgaeegdaejk...
result:
ok 42.
Test #33:
score: 0
Accepted
time: 3ms
memory: 5384kb
input:
fdbidbgedkbdfefhbbbfabeeijkcggjjhgjgakafgbfidkbikfgabaccejcaaahegacceadcgjfieefhbijgfaejifjcbaahabcakjkcdbiaadccbjceigigdcagjjickfkifibbkafkcicfcbihbkdcjggighfggeeakbkgbegbacghjghccjdkjbdcfbcbkbifhgkahecehafiabdeekfffgdedcdcefgikegikegehchcdgeahcbkiahkgkkegcfeecgkjbaajhihebaadkfhhebcdkbddhkjfgjffjhd...
output:
IMPOSSIBLE
result:
ok impossible
Test #34:
score: 0
Accepted
time: 1ms
memory: 4984kb
input:
khyjgiqkyrvokskexnktiafqmhvcdssahmywqavdeuaonqygwhdpheprmawgpdtlfquhghjwwupilrifwupknsdswbpwgqkddyhiqhwikkuieulpyslwfhvswvecfgywwyqesoaxfctarhyldtbpgbjkqyvreanikldsanlbswtuitjcjpqgsvagyyopjopummsektabbmrqtroaniegbsvmxeoqeaovtndtmbykrioinvkvefnnukqubmkkfkcharruyuvansyqdjbrmkldsyankiisvatlymwsybbhnogt...
output:
khyjgiqkyrvokskexnktiafqmhvcdssahmywqavdeuaonqygwhdpheprmawgpdtlfquhghjwwupilrifwupknsdswbpwgqkddyhiqhwikkuieulpyslwfhvswvecfgywwyqesoaxfctarhyldtbpgbjkqyvreanikldsanlbswtuitjcjpqgsvagyyopjopummsektabbmrqtroaniegbsvmxeoqeaovtndtmbykrioinvkvefnnukqubmkkfkcharruyuvansyqdjbrmkldsyankiisvatlymwsybbhnogt...
result:
ok 42.
Test #35:
score: 0
Accepted
time: 3ms
memory: 5304kb
input:
nckjbslymtlssunnymgeuohfdkhemidiayymjflsdhpidhcelymjdlovgwojdscptlludrmissjhgbdvujcbflnlnascvduudmnmkyvfsrosfugwvffyiwxtvvihduyybwifgpexplrdnnaremhcvflluunjonapjnyunyenqesspjxywictkwbyawietplvqmdmpokmqrrjdfhiwglrbmmyajnrqstxweinbdbnlghfgtgypxiinfqegwkxlunjekrcrvtiionjdfegnqnudnnfjppeqvwpwpmjnnaegymh...
output:
IMPOSSIBLE
result:
ok impossible
Test #36:
score: 0
Accepted
time: 1ms
memory: 4940kb
input:
hvvdmwifunbpfugevehooshdnelrgbabbvaxirgxgonsqlegxcebuphptqdgivvjejgbixbnhvclitiecfllgugoibntwkqmokgtufcorirtevbvvnevetkaopshairkjqqumusctjdtvhraajxvpdvgecasopqlmuumaehrfpokjlqplummvmfhstbfjpviqnsdjotdpcupjamjoldthwukaiuoxraptssjvbfqckumgwgwbpejobjjhdbwkdskgnfoomfjupwahfxgfjqgbgelfdioqhbicvbltbtuhjku...
output:
hvvdmwifunbpfugevehooshdnelrgbabbvaxirgxgonsqlegxcebuphptqdgivvjejgbixbnhvclitiecfllgugoibntwkqmokgtufcorirtevbvvnevetkaopshairkjqqumusctjdtvhraajxvpdvgecasopqlmuumaehrfpokjlqplummvmfhstbfjpviqnsdjotdpcupjamjoldthwukaiuoxraptssjvbfqckumgwgwbpejobjjhdbwkdskgnfoomfjupwahfxgfjqgbgelfdioqhbicvbltbtuhjku...
result:
ok 42.
Test #37:
score: 0
Accepted
time: 0ms
memory: 5288kb
input:
snfnaoxqkdloqvlnlehspwphraworjhuodrbglffngmksutghhahqkmwidixbtcfskhiqvaqxshqqaagtksxlsgvxpmcebcenswjwebskhtrkjdewfwjdxnknurrmuacjbhfhppcmmkvhxejrkehwrkotsqrhudodkjlehdrfccdhbsvlxtwuxnqiqjvfrfbvlwuuumhwatdmhwxnuerxknjvottxsdlxvdqqftthpohedaqxchwnbtrkgplnxitjidgalaoqxlvptpiajlfgnppgwnxxjcksldhtndxipjf...
output:
IMPOSSIBLE
result:
ok impossible
Test #38:
score: 0
Accepted
time: 3ms
memory: 5016kb
input:
gmoiwkitwetfqspnkfvsabbacmlosokmmkbpucsobkknocgadrpgtgitlwprkldeoosplkcirtoansccdkipohhtctfkksiajcbaeuqllgvmhvbipekndttgholamniwwdtivwpffmntvruteiqejdpqdjpbdiompavsubawumsvhhisivknnofjcdrcbtmgjhnuansevcgahfjojpqpwwjlskpjtdkteqesosjdsgeginwfldukjufumotmcnfdtkwbumeltlufdnrcdsecthehnrgpuiguwqlgnilomrrp...
output:
gmoiwkitwetfqspnkfvsabbacmlosokmmkbpucsobkknocgadrpgtgitlwprkldeoosplkcirtoansccdkipohhtctfkksiajcbaeuqllgvmhvbipekndttgholamniwwdtivwpffmntvruteiqejdpqdjpbdiompavsubawumsvhhisivknnofjcdrcbtmgjhnuansevcgahfjojpqpwwjlskpjtdkteqesosjdsgeginwfldukjufumotmcnfdtkwbumeltlufdnrcdsecthehnrgpuiguwqlgnilomrrp...
result:
ok 42.
Test #39:
score: 0
Accepted
time: 3ms
memory: 5540kb
input:
iauqfcjehcpskdqoulsfopicijtmfidmtabpcwddeqbktkfvuahlcfqpnwhcwehnovsjqjmokmgjfcnwgrorjkirgcgnckuqnpfidklcdcoehrouitivjoampfmncuwwwohcnwdgaetcuraebqupmndanmphhojhoircnfharaiefegvqaogcnhrtbncnvggubhwkbdowpririknauhhosbdaarvdiajvtacjnjgkecqrmdtanleusaopuwkbjidovqhhiqaaskrqgohrpdgkasitplagcikcoowvsrrdjnb...
output:
IMPOSSIBLE
result:
ok impossible
Test #40:
score: 0
Accepted
time: 1ms
memory: 5072kb
input:
fvkfpntjgkrebqtcfjvvsuunhppecgneilkhfnqchnnejtprkddithfjmbdfroupldqkltvgksnnivpdsrqcrnsqosdtkhipvqvvqumjlftrrdhdqcmoqeckttbajlvkuagsbrosojaregpbaqlioghgpnqrqijbauqdqviqumcocnqhmfiovtfdbgtbudretdnqlmbecihrgmoruvdiheroritnbkropapjlffmqeicrrtceegjfrppdgcpgpttiropkaudqihgouradfffhupcdeqhhcafdqkmisuakelg...
output:
fvkfpntjgkrebqtcfjvvsuunhppecgneilkhfnqchnnejtprkddithfjmbdfroupldqkltvgksnnivpdsrqcrnsqosdtkhipvqvvqumjlftrrdhdqcmoqeckttbajlvkuagsbrosojaregpbaqlioghgpnqrqijbauqdqviqumcocnqhmfiovtfdbgtbudretdnqlmbecihrgmoruvdiheroritnbkropapjlffmqeicrrtceegjfrppdgcpgpttiropkaudqihgouradfffhupcdeqhhcafdqkmisuakelg...
result:
ok 42.
Test #41:
score: 0
Accepted
time: 3ms
memory: 5140kb
input:
kpjglbkddikpldbiittivaurmfftmlspcchdlpekuduprigfcenuiocrgctoiulljdlenikjaaiikadtndeggfekqmpsoeakalqhufodgivdesdphvppguhcigndlcoqvbdusguvaerbgdmcfopebofskijqnfjgqnbssessshprjgrnuovsiupbahvfjioarimbvgmhqouretodmjiikioljaumoacjfvpamepqqpsegctacvguplpibtgovplgnbvnittvtfovpgkbncmljidpqtpfvtqhnhovjrcpprvj...
output:
IMPOSSIBLE
result:
ok impossible
Test #42:
score: 0
Accepted
time: 3ms
memory: 4320kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
result:
ok 42.
Test #43:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
aba aca
output:
acba
result:
ok 42.
Test #44:
score: 0
Accepted
time: 1ms
memory: 3644kb
input:
aaaa aaaa
output:
aaaaa
result:
ok 42.
Test #45:
score: 0
Accepted
time: 1ms
memory: 3636kb
input:
abac caba
output:
cabac
result:
ok 42.