Task: | Yellow Yacht |
Sender: | henrikaalto |
Submission time: | 2018-09-13 18:40:28 +0300 |
Language: | C++ |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.02 s | details |
#2 | ACCEPTED | 0.02 s | details |
#3 | WRONG ANSWER | 0.03 s | details |
#4 | WRONG ANSWER | 0.01 s | details |
#5 | WRONG ANSWER | 0.01 s | details |
#6 | WRONG ANSWER | 0.01 s | details |
#7 | WRONG ANSWER | 0.01 s | details |
#8 | WRONG ANSWER | 0.02 s | details |
#9 | WRONG ANSWER | 0.02 s | details |
#10 | WRONG ANSWER | 0.01 s | details |
#11 | WRONG ANSWER | 0.01 s | details |
#12 | WRONG ANSWER | 0.01 s | details |
#13 | WRONG ANSWER | 0.01 s | details |
#14 | WRONG ANSWER | 0.03 s | details |
#15 | WRONG ANSWER | 0.01 s | details |
#16 | WRONG ANSWER | 0.01 s | details |
#17 | WRONG ANSWER | 0.01 s | details |
#18 | WRONG ANSWER | 0.02 s | details |
#19 | WRONG ANSWER | 0.02 s | details |
#20 | WRONG ANSWER | 0.01 s | details |
#21 | WRONG ANSWER | 0.02 s | details |
#22 | WRONG ANSWER | 0.01 s | details |
#23 | WRONG ANSWER | 0.03 s | details |
#24 | WRONG ANSWER | 0.03 s | details |
#25 | WRONG ANSWER | 0.03 s | details |
#26 | WRONG ANSWER | 0.03 s | details |
#27 | WRONG ANSWER | 0.01 s | details |
#28 | WRONG ANSWER | 0.01 s | details |
#29 | WRONG ANSWER | 0.02 s | details |
#30 | WRONG ANSWER | 0.02 s | details |
#31 | WRONG ANSWER | 0.03 s | details |
#32 | WRONG ANSWER | 0.03 s | details |
#33 | WRONG ANSWER | 0.01 s | details |
#34 | WRONG ANSWER | 0.02 s | details |
#35 | WRONG ANSWER | 0.02 s | details |
#36 | WRONG ANSWER | 0.03 s | details |
#37 | WRONG ANSWER | 0.02 s | details |
#38 | WRONG ANSWER | 0.03 s | details |
#39 | WRONG ANSWER | 0.02 s | details |
#40 | WRONG ANSWER | 0.02 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:11:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(size_t i=0;i<m+1;i++){ ~^~~~ input/code.cpp:24:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(size_t i=0;i<m+1;i++){ ~^~~~ input/code.cpp:27:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(m<i+j){t=1;continue;} ~^~~~ input/code.cpp:29:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(m<i+j+k){t=1;continue;} ~^~~~~~ input/code.cpp:23:10: warning: variable 't' set but not used [-Wunused-but-set-variable] bool t; ^
Code
#include<iostream> int main(){ std::cin.tie(NULL);std::ios_base::sync_with_stdio(false); int m; std::cin>>m; //std::vector<pair<long long,int>> a; long long a[m+1]; long long temp; for(size_t i=0;i<m+1;i++){ std::cin>>temp;a[i]=temp; } //std::sort(a.begin(), a.end()) long long rec; if(m==0){rec=a[0]*3;} else{ // value = f(b) + f(s) + f(y) || where b+s+y ≤ m // long long rec=0; bool t; for(size_t i=0;i<m+1;i++){ t=0; for(size_t j=0;j<=i;j++){ if(m<i+j){t=1;continue;} for(size_t k=0;k<=i;k++){ if(m<i+j+k){t=1;continue;} rec=std::max(rec,a[i]+a[j]+a[k]); } } } } std::cout<<rec; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
11 1 0 5 9 10 2 16 13 0 19 27 6 |
correct output |
---|
30 |
user output |
---|
1 |
Test 2
Verdict: ACCEPTED
input |
---|
0 1000000000 |
correct output |
---|
3000000000 |
user output |
---|
3000000000 |
Test 3
Verdict: WRONG ANSWER
input |
---|
2 920723174 257627212 913447025 |
correct output |
---|
2762169522 |
user output |
---|
1 |
Test 4
Verdict: WRONG ANSWER
input |
---|
5 614204647 401645488 129928189 ... |
correct output |
---|
2208542492 |
user output |
---|
1 |
Test 5
Verdict: WRONG ANSWER
input |
---|
2 54256444 206394049 121104114 |
correct output |
---|
467044542 |
user output |
---|
1 |
Test 6
Verdict: WRONG ANSWER
input |
---|
7 686724308 438948356 427767957 ... |
correct output |
---|
2265598798 |
user output |
---|
1 |
Test 7
Verdict: WRONG ANSWER
input |
---|
1 311006810 735539135 |
correct output |
---|
1357552755 |
user output |
---|
1 |
Test 8
Verdict: WRONG ANSWER
input |
---|
5 909981712 474843756 579047072 ... |
correct output |
---|
2729945136 |
user output |
---|
1 |
Test 9
Verdict: WRONG ANSWER
input |
---|
8 263723811 263826078 552550124 ... |
correct output |
---|
1884971297 |
user output |
---|
1 |
Test 10
Verdict: WRONG ANSWER
input |
---|
10 47431982 572309863 790637525 8... |
correct output |
---|
2456821545 |
user output |
---|
1 |
Test 11
Verdict: WRONG ANSWER
input |
---|
1 563478341 732045107 |
correct output |
---|
1859001789 |
user output |
---|
1 |
Test 12
Verdict: WRONG ANSWER
input |
---|
8 168396217 182825737 225534050 ... |
correct output |
---|
821413368 |
user output |
---|
1 |
Test 13
Verdict: WRONG ANSWER
input |
---|
6 8239572 293118130 424765918 60... |
correct output |
---|
1323675241 |
user output |
---|
1 |
Test 14
Verdict: WRONG ANSWER
input |
---|
5 211820895 275557465 576359127 ... |
correct output |
---|
1608511210 |
user output |
---|
1 |
Test 15
Verdict: WRONG ANSWER
input |
---|
8 162356479 165603162 208896246 ... |
correct output |
---|
1408736671 |
user output |
---|
1 |
Test 16
Verdict: WRONG ANSWER
input |
---|
6 33810454 155427303 197741842 2... |
correct output |
---|
1049146136 |
user output |
---|
1 |
Test 17
Verdict: WRONG ANSWER
input |
---|
10 89578146 133230794 158521006 1... |
correct output |
---|
1097239610 |
user output |
---|
1 |
Test 18
Verdict: WRONG ANSWER
input |
---|
1 88800745 582507152 |
correct output |
---|
760108642 |
user output |
---|
1 |
Test 19
Verdict: WRONG ANSWER
input |
---|
9 149294988 180334552 204632615 ... |
correct output |
---|
1398889544 |
user output |
---|
1 |
Test 20
Verdict: WRONG ANSWER
input |
---|
4 34450153 238958390 488598926 5... |
correct output |
---|
1011648005 |
user output |
---|
1 |
Test 21
Verdict: WRONG ANSWER
input |
---|
10000 227479 285661 513806 630072 68... |
correct output |
---|
1000924493 |
user output |
---|
1 |
Test 22
Verdict: WRONG ANSWER
input |
---|
10000 191586 198991 372342 735942 77... |
correct output |
---|
1000549803 |
user output |
---|
1 |
Test 23
Verdict: WRONG ANSWER
input |
---|
10000 23304 120978 159707 237237 269... |
correct output |
---|
1000257360 |
user output |
---|
1 |
Test 24
Verdict: WRONG ANSWER
input |
---|
10000 106330 124685 139669 225487 28... |
correct output |
---|
1000093711 |
user output |
---|
1 |
Test 25
Verdict: WRONG ANSWER
input |
---|
10000 96109 126789 374207 443474 527... |
correct output |
---|
1002231297 |
user output |
---|
1 |
Test 26
Verdict: WRONG ANSWER
input |
---|
10000 40394 192904 233871 283485 309... |
correct output |
---|
1000269779 |
user output |
---|
1 |
Test 27
Verdict: WRONG ANSWER
input |
---|
10000 162 68418 321306 421852 534881... |
correct output |
---|
1000703483 |
user output |
---|
1 |
Test 28
Verdict: WRONG ANSWER
input |
---|
10000 33576 196666 222231 266386 412... |
correct output |
---|
1000225728 |
user output |
---|
1 |
Test 29
Verdict: WRONG ANSWER
input |
---|
10000 4719 63323 145092 321089 35037... |
correct output |
---|
1000090145 |
user output |
---|
1 |
Test 30
Verdict: WRONG ANSWER
input |
---|
10000 156131 290420 301158 429339 45... |
correct output |
---|
1000623062 |
user output |
---|
1 |
Test 31
Verdict: WRONG ANSWER
input |
---|
10000 439837926 276260661 669189511 ... |
correct output |
---|
2998362551 |
user output |
---|
1 |
Test 32
Verdict: WRONG ANSWER
input |
---|
10000 610855962 876847879 551857669 ... |
correct output |
---|
2999475210 |
user output |
---|
1 |
Test 33
Verdict: WRONG ANSWER
input |
---|
10000 3633323 506510656 783930239 49... |
correct output |
---|
2999538446 |
user output |
---|
1 |
Test 34
Verdict: WRONG ANSWER
input |
---|
10000 476322283 58861121 11409462 80... |
correct output |
---|
2999273030 |
user output |
---|
1 |
Test 35
Verdict: WRONG ANSWER
input |
---|
10000 929676273 823199130 76129456 9... |
correct output |
---|
2999801112 |
user output |
---|
1 |
Test 36
Verdict: WRONG ANSWER
input |
---|
10000 1000000000 1000000000 10000000... |
correct output |
---|
3000000000 |
user output |
---|
1 |
Test 37
Verdict: WRONG ANSWER
input |
---|
10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... |
correct output |
---|
0 |
user output |
---|
1 |
Test 38
Verdict: WRONG ANSWER
input |
---|
10000 10000 19999 29998 39997 49996 ... |
correct output |
---|
100020000 |
user output |
---|
1 |
Test 39
Verdict: WRONG ANSWER
input |
---|
10000 0 100000 200000 300000 400000 ... |
correct output |
---|
1000000000 |
user output |
---|
1 |
Test 40
Verdict: WRONG ANSWER
input |
---|
10000 1000000000 999900000 999800000... |
correct output |
---|
3000000000 |
user output |
---|
1 |