Task: | Platformer |
Sender: | Team Purkka |
Submission time: | 2015-09-16 18:59:41 +0300 |
Language: | C++ |
Status: | READY |
Result: | TIME LIMIT EXCEEDED |
test | verdict | time | |
---|---|---|---|
#1 | TIME LIMIT EXCEEDED | -- | details |
#2 | TIME LIMIT EXCEEDED | -- | details |
#3 | TIME LIMIT EXCEEDED | -- | details |
#4 | TIME LIMIT EXCEEDED | -- | details |
#5 | TIME LIMIT EXCEEDED | -- | details |
#6 | TIME LIMIT EXCEEDED | -- | details |
#7 | TIME LIMIT EXCEEDED | -- | details |
#8 | ACCEPTED | 0.06 s | details |
#9 | TIME LIMIT EXCEEDED | -- | details |
#10 | WRONG ANSWER | 0.07 s | details |
#11 | TIME LIMIT EXCEEDED | -- | details |
#12 | TIME LIMIT EXCEEDED | -- | details |
#13 | ACCEPTED | 0.06 s | details |
#14 | WRONG ANSWER | 0.06 s | details |
#15 | WRONG ANSWER | 0.06 s | details |
#16 | ACCEPTED | 0.08 s | details |
#17 | ACCEPTED | 0.07 s | details |
#18 | TIME LIMIT EXCEEDED | -- | details |
#19 | TIME LIMIT EXCEEDED | -- | details |
#20 | TIME LIMIT EXCEEDED | -- | details |
#21 | WRONG ANSWER | 0.11 s | details |
#22 | TIME LIMIT EXCEEDED | -- | details |
#23 | ACCEPTED | 0.05 s | details |
#24 | TIME LIMIT EXCEEDED | -- | details |
#25 | ACCEPTED | 0.05 s | details |
#26 | TIME LIMIT EXCEEDED | -- | details |
#27 | WRONG ANSWER | 0.08 s | details |
#28 | ACCEPTED | 0.06 s | details |
#29 | TIME LIMIT EXCEEDED | -- | details |
#30 | ACCEPTED | 0.07 s | details |
#31 | ACCEPTED | 0.05 s | details |
#32 | RUNTIME ERROR | 0.18 s | details |
#33 | RUNTIME ERROR | 0.19 s | details |
#34 | RUNTIME ERROR | 0.17 s | details |
#35 | RUNTIME ERROR | 0.19 s | details |
#36 | RUNTIME ERROR | 0.20 s | details |
#37 | RUNTIME ERROR | 0.18 s | details |
#38 | RUNTIME ERROR | 0.18 s | details |
#39 | RUNTIME ERROR | 0.19 s | details |
#40 | RUNTIME ERROR | 0.18 s | details |
#41 | RUNTIME ERROR | 0.19 s | details |
#42 | RUNTIME ERROR | 0.19 s | details |
#43 | RUNTIME ERROR | 0.18 s | details |
#44 | RUNTIME ERROR | 0.17 s | details |
#45 | RUNTIME ERROR | 0.17 s | details |
#46 | RUNTIME ERROR | 0.19 s | details |
#47 | RUNTIME ERROR | 0.18 s | details |
#48 | RUNTIME ERROR | 0.19 s | details |
#49 | RUNTIME ERROR | 0.18 s | details |
#50 | RUNTIME ERROR | 0.19 s | details |
#51 | RUNTIME ERROR | 0.18 s | details |
Code
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct drink { int x; int val; drink() {} drink(int nx, int nval): x(nx), val(nval) {} }; struct err {}; int n,q,w,k; void try_find(drink *ds,int left,int xpos,int ypos,int l) { if(left>=k*(n-ypos-1))throw err(); for(int i=ypos;ypos<n&&left>=k*(i-ypos);i++) { if(ds[i].val==0)continue; int dx=abs(xpos-ds[i].x); if(left<dx+k*(i-ypos))continue; drink nds[n]; for(int j=0;j<n;j++)nds[j]=ds[i]; nds[i]=drink(0,0); try_find(nds,left-dx-k*(i-ypos),ds[i].x,i,l+1); } } int main() { cin.sync_with_stdio(false); cin>>n>>q>>w>>k; drink ds[n]; int b,x,v; for (int i =0;i<n;i++){ cin>>b; if(b){ cin>>x>>v; ds[i]=drink(x-1,v); }else{ ds[i]=drink(0,0); } } try{ try_find(ds,w,q,0,0); cout<<"QAQ"<<endl; }catch(err e){ cout<<"10-4"<<endl; } return 0; }
Test details
Test 1
Verdict: TIME LIMIT EXCEEDED
input |
---|
93720 39133 271745 8828 0 1 35503 41358 0 0 ... |
correct output |
---|
QAQ |
user output |
---|
(empty) |
Test 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
97192 56015 123131 3873 1 83352 32477 1 94775 7864 0 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
99108 94600 113316 4855 0 0 0 0 ... |
correct output |
---|
QAQ |
user output |
---|
(empty) |
Test 4
Verdict: TIME LIMIT EXCEEDED
input |
---|
94908 98153 200335 9390 0 1 97222 4762 1 92494 69700 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 5
Verdict: TIME LIMIT EXCEEDED
input |
---|
97925 19788 254413 9008 1 50423 68974 0 0 1 90601 12470 ... |
correct output |
---|
QAQ |
user output |
---|
(empty) |
Test 6
Verdict: TIME LIMIT EXCEEDED
input |
---|
90769 94368 226055 9254 1 6188 38889 0 0 1 15760 61611 ... |
correct output |
---|
QAQ |
user output |
---|
(empty) |
Test 7
Verdict: TIME LIMIT EXCEEDED
input |
---|
93010 53265 141409 6629 1 69399 59938 0 0 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 8
Verdict: ACCEPTED
input |
---|
94604 86622 3197 291 1 33740 246144103 1 14472 413062285 1 21305 728358221 1 97273 666356704 ... |
correct output |
---|
QAQ |
user output |
---|
QAQ |
Test 9
Verdict: TIME LIMIT EXCEEDED
input |
---|
90370 12656 203687 7741 0 1 20615 4965 0 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 10
Verdict: WRONG ANSWER
input |
---|
92711 1731 84200 9537 1 22362 44030 0 1 73954 148394 1 58582 92246 ... |
correct output |
---|
10-4 |
user output |
---|
QAQ |
Test 11
Verdict: TIME LIMIT EXCEEDED
input |
---|
97776 25155 104115 3949 1 68851 39872 1 23281 27180 0 0 ... |
correct output |
---|
QAQ |
user output |
---|
(empty) |
Test 12
Verdict: TIME LIMIT EXCEEDED
input |
---|
94285 13824 213256 6473 1 19089 7129 1 91649 15534 0 1 84631 18708 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 13
Verdict: ACCEPTED
input |
---|
97129 78853 3211 934 1 83665 499047841 0 0 0 ... |
correct output |
---|
QAQ |
user output |
---|
QAQ |
Test 14
Verdict: WRONG ANSWER
input |
---|
97992 37208 81257 9418 0 0 1 16726 18007 0 ... |
correct output |
---|
10-4 |
user output |
---|
QAQ |
Test 15
Verdict: WRONG ANSWER
input |
---|
91420 4824 115989 9403 0 1 77876 68096 1 42186 46525 0 ... |
correct output |
---|
10-4 |
user output |
---|
QAQ |
Test 16
Verdict: ACCEPTED
input |
---|
96179 90979 49680 2890 0 0 0 1 62847 45363 ... |
correct output |
---|
QAQ |
user output |
---|
QAQ |
Test 17
Verdict: ACCEPTED
input |
---|
95647 17291 19818 1740 1 61265 234051494 0 0 1 9322 35801 ... |
correct output |
---|
QAQ |
user output |
---|
QAQ |
Test 18
Verdict: TIME LIMIT EXCEEDED
input |
---|
98835 73849 160991 5151 1 3346 15560 1 42345 51204 0 1 71893 3785 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 19
Verdict: TIME LIMIT EXCEEDED
input |
---|
91256 48792 152543 5308 1 99803 46272 0 1 65300 39202 1 83359 39980 ... |
correct output |
---|
QAQ |
user output |
---|
(empty) |
Test 20
Verdict: TIME LIMIT EXCEEDED
input |
---|
98178 44514 183313 7966 0 0 0 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 21
Verdict: WRONG ANSWER
input |
---|
90142 20281 154074 8583 0 0 0 1 65682 10123 ... |
correct output |
---|
10-4 |
user output |
---|
QAQ |
Test 22
Verdict: TIME LIMIT EXCEEDED
input |
---|
99508 50312 28005 1483 1 8698 561100463 1 27518 17753 1 35183 6874 1 51423 709 ... |
correct output |
---|
QAQ |
user output |
---|
(empty) |
Test 23
Verdict: ACCEPTED
input |
---|
93572 52286 10683 5994 0 1 44635 143939594 1 98077 274789312 1 29936 101782377 ... |
correct output |
---|
QAQ |
user output |
---|
QAQ |
Test 24
Verdict: TIME LIMIT EXCEEDED
input |
---|
99507 16701 226527 9776 1 6848 34903 0 1 84638 50801 1 91779 82623 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 25
Verdict: ACCEPTED
input |
---|
93687 91600 174 117 0 1 72495 527049261 0 1 61437 169018252 ... |
correct output |
---|
QAQ |
user output |
---|
QAQ |
Test 26
Verdict: TIME LIMIT EXCEEDED
input |
---|
92181 11937 165368 5326 1 93556 16607 1 63375 639 0 1 34722 2656 ... |
correct output |
---|
QAQ |
user output |
---|
(empty) |
Test 27
Verdict: WRONG ANSWER
input |
---|
99053 16063 75605 6270 0 0 1 25114 124515 1 7349 30745 ... |
correct output |
---|
10-4 |
user output |
---|
QAQ |
Test 28
Verdict: ACCEPTED
input |
---|
91912 80570 12959 635 0 1 58320 237459984 1 47571 169756497 1 34391 329136180 ... |
correct output |
---|
QAQ |
user output |
---|
QAQ |
Test 29
Verdict: TIME LIMIT EXCEEDED
input |
---|
97096 15695 104773 5067 0 1 57538 26420 1 17419 65054 1 55286 49658 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 30
Verdict: ACCEPTED
input |
---|
94271 93605 53716 7282 0 0 0 1 63342 63872 ... |
correct output |
---|
QAQ |
user output |
---|
QAQ |
Test 31
Verdict: ACCEPTED
input |
---|
10 48792 152543 5308 0 0 0 0 ... |
correct output |
---|
10-4 |
user output |
---|
10-4 |
Test 32
Verdict: RUNTIME ERROR
input |
---|
97186 68207 36491 1 1 62847 1015 1 10662 424705944 1 63603 31508 1 93933 31123 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 33
Verdict: RUNTIME ERROR
input |
---|
98824 51796 60765 1 1 57459 6393 1 81114 11603 0 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 34
Verdict: RUNTIME ERROR
input |
---|
99707 79141 24396 1 1 15305 787266981 1 40625 325204064 1 71642 27545 1 11143 519121854 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 35
Verdict: RUNTIME ERROR
input |
---|
99499 66563 10726 1 0 1 50930 4917259 1 89683 362392181 1 56945 6604 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 36
Verdict: RUNTIME ERROR
input |
---|
96474 74211 32506 2 1 23133 265260726 0 1 55091 111891 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 37
Verdict: RUNTIME ERROR
input |
---|
98892 62723 24829 1 1 91722 519273406 1 37709 465156425 1 94342 847977954 1 58182 9236 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 38
Verdict: RUNTIME ERROR
input |
---|
95020 50407 58686 2 1 98541 88094 1 99994 29336 0 1 68064 24948 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 39
Verdict: RUNTIME ERROR
input |
---|
99678 16584 44706 1 1 9935 1157 1 61471 809296994 1 25220 24675 1 43197 21080 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 40
Verdict: RUNTIME ERROR
input |
---|
97562 3891 116896 2 1 5550 10290 1 3235 2632 1 92484 60120 1 42302 23320 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 41
Verdict: RUNTIME ERROR
input |
---|
95382 38603 53680 2 0 1 73212 43790 1 9191 11570 1 15853 77057 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 42
Verdict: RUNTIME ERROR
input |
---|
98321 68338 7247 1 0 1 70810 476 1 12697 537286430 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 43
Verdict: RUNTIME ERROR
input |
---|
96622 16601 3959 1 1 31931 888513681 1 90381 431318803 1 9327 433232402 1 97464 149691554 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 44
Verdict: RUNTIME ERROR
input |
---|
98097 3823 31380 1 1 49745 170502842 1 24743 4541 1 37009 145 1 1903 776 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 45
Verdict: RUNTIME ERROR
input |
---|
96353 99694 19331 2 1 6141 280627823 1 5938 685091507 0 1 75645 36271308 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 46
Verdict: RUNTIME ERROR
input |
---|
96566 6661 63261 1 1 52321 3509 1 28252 1429 0 1 36092 1839 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 47
Verdict: RUNTIME ERROR
input |
---|
97998 25315 9841 2 0 1 81801 398177857 0 1 60076 10826582 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 48
Verdict: RUNTIME ERROR
input |
---|
98709 93527 29589 1 0 1 40439 472607569 1 24151 449756851 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 49
Verdict: RUNTIME ERROR
input |
---|
98681 12780 1379 1 0 0 1 52013 938639644 1 5933 109004048 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 50
Verdict: RUNTIME ERROR
input |
---|
96889 34349 15648 1 1 41768 2294 1 85676 615774769 1 97093 519801205 0 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |
Test 51
Verdict: RUNTIME ERROR
input |
---|
95849 18797 40401 1 1 7503 649 0 0 1 56595 347 ... |
correct output |
---|
10-4 |
user output |
---|
(empty) |