| Task: | Decrypt |
| Sender: | Kyynel ;_; |
| Submission time: | 2016-09-06 18:05:10 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | ACCEPTED | 0.04 s | details |
| #2 | ACCEPTED | 0.05 s | details |
| #3 | WRONG ANSWER | 0.04 s | details |
| #4 | WRONG ANSWER | 0.05 s | details |
| #5 | ACCEPTED | 0.05 s | details |
| #6 | WRONG ANSWER | 0.05 s | details |
| #7 | WRONG ANSWER | 0.06 s | details |
| #8 | ACCEPTED | 0.05 s | details |
| #9 | WRONG ANSWER | 0.06 s | details |
| #10 | WRONG ANSWER | 0.05 s | details |
| #11 | ACCEPTED | 0.05 s | details |
| #12 | WRONG ANSWER | 0.06 s | details |
| #13 | WRONG ANSWER | 0.05 s | details |
| #14 | ACCEPTED | 0.05 s | details |
| #15 | WRONG ANSWER | 0.05 s | details |
| #16 | WRONG ANSWER | 0.05 s | details |
| #17 | ACCEPTED | 0.05 s | details |
| #18 | WRONG ANSWER | 0.05 s | details |
| #19 | ACCEPTED | 0.05 s | details |
| #20 | ACCEPTED | 0.05 s | details |
| #21 | WRONG ANSWER | 0.06 s | details |
| #22 | WRONG ANSWER | 0.05 s | details |
| #23 | ACCEPTED | 0.05 s | details |
| #24 | ACCEPTED | 0.05 s | details |
| #25 | ACCEPTED | 0.05 s | details |
| #26 | ACCEPTED | 0.05 s | details |
| #27 | WRONG ANSWER | 0.05 s | details |
| #28 | WRONG ANSWER | 0.06 s | details |
| #29 | ACCEPTED | 0.05 s | details |
| #30 | ACCEPTED | 0.06 s | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:26:13: warning: array subscript has type 'char' [-Wchar-subscripts]
OOliOO[c]++;
^
input/code.cpp:27:10: warning: array subscript has type 'char' [-Wchar-subscripts]
asd[c][0] = x;
^
input/code.cpp:29:17: warning: array subscript has type 'char' [-Wchar-subscripts]
if (OOliOO[c] > 1) cout<<"impossible"<<endl, exit(0);
^
input/code.cpp:38:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < t.length(); j++) {
^
input/code.cpp:39:17: warning: array subscript has type 'char' [-Wchar-subscripts]
t[j] = asd[t[j]][i];
^Code
#include <bits/stdc++.h>
#define ll long long
#define N (1<<17)
#define ld long double
#define F first
#define S second
#define INF 1000111000
#define M 1000000007
using namespace std;
int OOliOO[255];
int asd[255][31];
int main () {
cin.sync_with_stdio(false);
cin.tie(0);
string s;
cin>>s;
int k;
cin>>k;
string t;
cin>>t;
int x = 'a';
for (char c : s) {
OOliOO[c]++;
asd[c][0] = x;
x++;
if (OOliOO[c] > 1) cout<<"impossible"<<endl, exit(0);
}
for (int i = 1; i < 31; i++) {
for (int j = 'a'; j <= 'z'; j++) {
asd[asd[j][i - 1]][i] = asd[j][i - 1];
}
}
for (int i = 0; i < 31; i++) {
if (k & (1<<i)) {
for (int j = 0; j < t.length(); j++) {
t[j] = asd[t[j]][i];
}
}
}
cout<<t<<endl;
}Test details
Test 1
Verdict: ACCEPTED
| input |
|---|
| egkpmqujbxhiatorvznwcfynds 564... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 2
Verdict: ACCEPTED
| input |
|---|
| pdabvolaobzbaaisrntdtwluwf 2 oooooooooooooooooooooooooooooo... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| xtaoqlsjkezrcvinwfmbyhdgpu 872... |
| correct output |
|---|
| mmm |
| user output |
|---|
| aaa |
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| wlcpatbrudxhofijgskqgevymz 1 joojjojjjoojjjjoojjojoojojoojj... |
| correct output |
|---|
| pmmppmpppmmppppmmppmpmmpmpmmpp... |
| user output |
|---|
| impossible |
Test 5
Verdict: ACCEPTED
| input |
|---|
| tjyivkaulcjnehvtilatxjxmxd 300... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| tonbvkcqilfjghszxpwmdureay 2 nnv |
| correct output |
|---|
| ggx |
| user output |
|---|
| nnv |
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| edmxaqolzisvnrfkcgwehbtjpu 179... |
| correct output |
|---|
| oooooooooooooooooooooooooooooo... |
| user output |
|---|
| impossible |
Test 8
Verdict: ACCEPTED
| input |
|---|
| hrygatmxebcusinbdplunukuai 1 i |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| nsuftdzbmkqepgihlyxrvwajoc 724... |
| correct output |
|---|
| offfofofofofoffooofofooofffffo... |
| user output |
|---|
| efffefefefefeffeeefefeeefffffe... |
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| kbybextsniougrdmqpwfahzlcv 2 stlooyhhdfzpspsospvhdpedouqsyr... |
| correct output |
|---|
| vmfaayzzkgsnvnvavnwzknekaxqvyi... |
| user output |
|---|
| impossible |
Test 11
Verdict: ACCEPTED
| input |
|---|
| dugyojozcpjlwxepebzhfkqlzc 801... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| kibphqeygnmsdvawzrfcuotxjl 2 ggggggggggggggggggggggggggg |
| correct output |
|---|
| bbbbbbbbbbbbbbbbbbbbbbbbbbb |
| user output |
|---|
| ggggggggggggggggggggggggggg |
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| pstlbyjnovmekdqzrhwxwgcfai 315... |
| correct output |
|---|
| mmm |
| user output |
|---|
| impossible |
Test 14
Verdict: ACCEPTED
| input |
|---|
| uukjvcscfohyvqomdfdlysnuoe 2 eheeheheeheheeheeheeeehhhheehh... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 15
Verdict: WRONG ANSWER
| input |
|---|
| pkwsxbvdgmjutiyfqrzhealnoc 822... |
| correct output |
|---|
| hbkxkmhinhmwhwthbmhutgnkgoywho... |
| user output |
|---|
| ldspsclbflciliwldclvwkfskoyilo... |
Test 16
Verdict: WRONG ANSWER
| input |
|---|
| yqxvbohrlifmzdtwgejpcanuse 1 fl |
| correct output |
|---|
| ki |
| user output |
|---|
| impossible |
Test 17
Verdict: ACCEPTED
| input |
|---|
| gauouzffisuxjtuufqdappivxv 205... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 18
Verdict: WRONG ANSWER
| input |
|---|
| ovqzprxiluehkndsmtyafbwgjc 2 oo |
| correct output |
|---|
| tt |
| user output |
|---|
| oo |
Test 19
Verdict: ACCEPTED
| input |
|---|
| goqbyzivahrxnjwtdjluepsmkf 701... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 20
Verdict: ACCEPTED
| input |
|---|
| vlovrwpvkfbotybcmcbixsbfly 2 jutqryuhbjjqvbpaeqoyduqneybsli... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 21
Verdict: WRONG ANSWER
| input |
|---|
| eawzhgmusltxjypkirbcfndovq 262... |
| correct output |
|---|
| a |
| user output |
|---|
| m |
Test 22
Verdict: WRONG ANSWER
| input |
|---|
| kqdpgnevpuyahrjclfzwsomxti 2 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkk... |
| correct output |
|---|
| llllllllllllllllllllllllllllll... |
| user output |
|---|
| impossible |
Test 23
Verdict: ACCEPTED
| input |
|---|
| xwfgenquyctxdvmptcrdhvcxwq 778... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 24
Verdict: ACCEPTED
| input |
|---|
| sucejvkmrhtobzxglapdnifqwy 1 qddqqqqqdqqqqddddqqdqqqdqdqddq... |
| correct output |
|---|
| xttxxxxxtxxxxttttxxtxxxtxtxttx... |
| user output |
|---|
| xttxxxxxtxxxxttttxxtxxxtxtxttx... |
Test 25
Verdict: ACCEPTED
| input |
|---|
| pzukghijmcsalwnvoydxftbreu 413... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 26
Verdict: ACCEPTED
| input |
|---|
| adlsmbfijwmdcwglhgnvaooybu 1 aio |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 27
Verdict: WRONG ANSWER
| input |
|---|
| zqynskaxvcljewmfditourgpbh 756... |
| correct output |
|---|
| oooooooooooooooooooooooooooooo... |
| user output |
|---|
| eeeeeeeeeeeeeeeeeeeeeeeeeeeeee... |
Test 28
Verdict: WRONG ANSWER
| input |
|---|
| truzcldhkeqspoabgyvmjwnfik 1 zz |
| correct output |
|---|
| dd |
| user output |
|---|
| impossible |
Test 29
Verdict: ACCEPTED
| input |
|---|
| upfasuzkjuwhrnajgmitgysvil 467... |
| correct output |
|---|
| impossible |
| user output |
|---|
| impossible |
Test 30
Verdict: ACCEPTED
| input |
|---|
| bemlodzqjgixuksatvyfcpnhrw 1 zdaaskooqkzzifuzspzayokihzxqhf... |
| correct output |
|---|
| gfpponeehnggktmgovgpsenkxglhxt... |
| user output |
|---|
| gfpponeehnggktmgovgpsenkxglhxt... |
