Task: | slom |
Sender: | Hansuzu |
Submission time: | 2016-08-01 15:36:27 +0300 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.06 s | details |
#2 | ACCEPTED | 0.06 s | details |
#3 | ACCEPTED | 0.06 s | details |
#4 | ACCEPTED | 0.06 s | details |
#5 | WRONG ANSWER | 0.06 s | details |
#6 | ACCEPTED | 0.05 s | details |
#7 | WRONG ANSWER | 0.06 s | details |
#8 | WRONG ANSWER | 0.06 s | details |
#9 | ACCEPTED | 0.05 s | details |
#10 | WRONG ANSWER | 0.05 s | details |
#11 | WRONG ANSWER | 0.05 s | details |
#12 | ACCEPTED | 0.06 s | details |
#13 | ACCEPTED | 0.05 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:19:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=0; i<s.size(); ++i){ ^
Code
#include <iostream> using namespace std; int X; string s; int n[1010]; char ans[1010]; int main(){ cin >> X >> s; X%=(s.size()-1); X=(s.size()-1)-X; for (int i=1; i<((int)s.size()-1)/2+1; ++i){ n[i]=2*i; n[s.size()-i]=n[i]-1; } if (s.size()%2==0) n[s.size()/2]=s.size()-1; for (int i=0; i<s.size(); ++i){ int k=i; for (int j=0; j<X; ++j) k=n[k]; ans[k]=s[i]; } cout << ans << "\n"; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
4
acefdb |
correct output |
---|
abcdef |
user output |
---|
abcdef |
Test 2
Verdict: ACCEPTED
input |
---|
1000
aaaaaa |
correct output |
---|
aaaaaa |
user output |
---|
aaaaaa |
Test 3
Verdict: ACCEPTED
input |
---|
11
srama |
correct output |
---|
sarma |
user output |
---|
sarma |
Test 4
Verdict: ACCEPTED
input |
---|
10
tbqhcahaje |
correct output |
---|
tqchjeaahb |
user output |
---|
tqchjeaahb |
Test 5
Verdict: WRONG ANSWER
input |
---|
50
mvkaysdrpqkahelvtxwd |
correct output |
---|
myphtdvaravsqexwlkdk |
user output |
---|
mrlwayakxvpvdedhskqt |
Test 6
Verdict: ACCEPTED
input |
---|
60
hfhnhgjyqegacpwcvieckehtayuqgi... |
correct output |
---|
hhqcvkagqtccaynfgepieyiuhewgjh... |
user output |
---|
hhqcvkagqtccaynfgepieyiuhewgjh |
Test 7
Verdict: WRONG ANSWER
input |
---|
100
kqrminhwirfjvnliauxbnltmdxexqg... |
correct output |
---|
kddjxfpoagwhrigjcifgqxwynfwckj... |
user output |
---|
kreopgvemnyljogsbmpcsfqghaixtl... |
Test 8
Verdict: WRONG ANSWER
input |
---|
100
renxibkpvavjnopqftypofrtfbfkke... |
correct output |
---|
rpmkvedndjakqcrybmuywbnqspjraq... |
user output |
---|
rebiubphwmeewfaybidlfrneddcvlw... |
Test 9
Verdict: ACCEPTED
input |
---|
98765322
pjbsuxmdxyoxmlfokhmgpcnebqcpyx... |
correct output |
---|
pgypycmdmnjkrlkcaqtrwyhdswtmne... |
user output |
---|
pgypycmdmnjkrlkcaqtrwyhdswtmne... |
Test 10
Verdict: WRONG ANSWER
input |
---|
33892018
bmrtldbdycikkknkifujppdldpqxee... |
correct output |
---|
bwxqwwogalkjqrrarbqlrekfxoltkf... |
user output |
---|
bldwsjcapblbxouaftrytdhekwifnn... |
Test 11
Verdict: WRONG ANSWER
input |
---|
839254838
xjvoqfnjtgcscdexvaccdetxxppgsl... |
correct output |
---|
xvuocylqxrdedqcirbveydcculfmev... |
user output |
---|
xcakjeruvtwooctaqhaxfiynnefvjs... |
Test 12
Verdict: ACCEPTED
input |
---|
1000000000
rsiufeylcjcvvyaxuknaxpjmelvugt... |
correct output |
---|
rifyccvaunxjevgumtjieklaxggldh... |
user output |
---|
rifyccvaunxjevgumtjieklaxggldh... |
Test 13
Verdict: ACCEPTED
input |
---|
997997997
pintfuxuddywgihkulppiuhwdpofbc... |
correct output |
---|
pasfapecysfwqommqhotrublrmbpdn... |
user output |
---|
pasfapecysfwqommqhotrublrmbpdn... |