Task: | Scorpion and frogs |
Sender: | aalto2024a_007 |
Submission time: | 2024-09-04 16:48:41 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.00 s | details |
#2 | ACCEPTED | 0.00 s | details |
#3 | ACCEPTED | 0.00 s | details |
#4 | WRONG ANSWER | 0.00 s | details |
#5 | WRONG ANSWER | 0.00 s | details |
#6 | WRONG ANSWER | 0.00 s | details |
#7 | WRONG ANSWER | 0.00 s | details |
#8 | WRONG ANSWER | 0.00 s | details |
#9 | WRONG ANSWER | 0.00 s | details |
#10 | WRONG ANSWER | 0.00 s | details |
#11 | WRONG ANSWER | 0.00 s | details |
#12 | WRONG ANSWER | 0.00 s | details |
#13 | WRONG ANSWER | 0.00 s | details |
#14 | WRONG ANSWER | 0.00 s | details |
#15 | WRONG ANSWER | 0.00 s | details |
#16 | WRONG ANSWER | 0.00 s | details |
#17 | WRONG ANSWER | 0.01 s | details |
#18 | WRONG ANSWER | 0.01 s | details |
#19 | WRONG ANSWER | 0.01 s | details |
#20 | WRONG ANSWER | 0.01 s | details |
#21 | TIME LIMIT EXCEEDED | -- | details |
#22 | TIME LIMIT EXCEEDED | -- | details |
#23 | TIME LIMIT EXCEEDED | -- | details |
#24 | TIME LIMIT EXCEEDED | -- | details |
#25 | TIME LIMIT EXCEEDED | -- | details |
#26 | TIME LIMIT EXCEEDED | -- | details |
#27 | TIME LIMIT EXCEEDED | -- | details |
#28 | TIME LIMIT EXCEEDED | -- | details |
#29 | TIME LIMIT EXCEEDED | -- | details |
#30 | TIME LIMIT EXCEEDED | -- | details |
#31 | TIME LIMIT EXCEEDED | -- | details |
#32 | TIME LIMIT EXCEEDED | -- | details |
#33 | TIME LIMIT EXCEEDED | -- | details |
#34 | TIME LIMIT EXCEEDED | -- | details |
#35 | TIME LIMIT EXCEEDED | -- | details |
#36 | TIME LIMIT EXCEEDED | -- | details |
#37 | TIME LIMIT EXCEEDED | -- | details |
#38 | TIME LIMIT EXCEEDED | -- | details |
#39 | TIME LIMIT EXCEEDED | -- | details |
#40 | TIME LIMIT EXCEEDED | -- | details |
#41 | TIME LIMIT EXCEEDED | -- | details |
#42 | TIME LIMIT EXCEEDED | -- | details |
#43 | TIME LIMIT EXCEEDED | -- | details |
#44 | TIME LIMIT EXCEEDED | -- | details |
#45 | TIME LIMIT EXCEEDED | -- | details |
#46 | TIME LIMIT EXCEEDED | -- | details |
#47 | TIME LIMIT EXCEEDED | -- | details |
#48 | TIME LIMIT EXCEEDED | -- | details |
#49 | TIME LIMIT EXCEEDED | -- | details |
#50 | TIME LIMIT EXCEEDED | -- | details |
#51 | TIME LIMIT EXCEEDED | -- | details |
#52 | TIME LIMIT EXCEEDED | -- | details |
#53 | TIME LIMIT EXCEEDED | -- | details |
#54 | TIME LIMIT EXCEEDED | -- | details |
#55 | TIME LIMIT EXCEEDED | -- | details |
Compiler report
input/code.cpp: In function 'int recCount(std::vector<bool>&, int)': input/code.cpp:7:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<bool>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 7 | if((position)>=ranasVivas.size()){ | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ input/code.cpp:11:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<bool>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 11 | for(int i=1; i<(ranasVivas.size()-position)+1; i++){ | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Code
#include <iostream> #include <vector> using namespace std; int recCount(vector<bool> &ranasVivas, int position){ if((position)>=ranasVivas.size()){ return 1; } int count=0; for(int i=1; i<(ranasVivas.size()-position)+1; i++){ if(ranasVivas[position+i-1]==true){ ranasVivas[position+i-1]=false; count += recCount(ranasVivas, position+i); } ranasVivas[position+i-1]=true; } return (count%998244353); } int main(){ int ranas; cin >> ranas; vector<bool> ranasVivas(ranas, true); cout << ((recCount(ranasVivas, 0)+1)%998244353); }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 |
correct output |
---|
2 |
user output |
---|
2 |
Test 2
Verdict: ACCEPTED
input |
---|
2 |
correct output |
---|
3 |
user output |
---|
3 |
Test 3
Verdict: ACCEPTED
input |
---|
3 |
correct output |
---|
5 |
user output |
---|
5 |
Test 4
Verdict: WRONG ANSWER
input |
---|
4 |
correct output |
---|
8 |
user output |
---|
9 |
Test 5
Verdict: WRONG ANSWER
input |
---|
5 |
correct output |
---|
13 |
user output |
---|
17 |
Test 6
Verdict: WRONG ANSWER
input |
---|
6 |
correct output |
---|
21 |
user output |
---|
33 |
Test 7
Verdict: WRONG ANSWER
input |
---|
7 |
correct output |
---|
34 |
user output |
---|
65 |
Test 8
Verdict: WRONG ANSWER
input |
---|
8 |
correct output |
---|
55 |
user output |
---|
129 |
Test 9
Verdict: WRONG ANSWER
input |
---|
9 |
correct output |
---|
89 |
user output |
---|
257 |
Test 10
Verdict: WRONG ANSWER
input |
---|
10 |
correct output |
---|
144 |
user output |
---|
513 |
Test 11
Verdict: WRONG ANSWER
input |
---|
11 |
correct output |
---|
233 |
user output |
---|
1025 |
Test 12
Verdict: WRONG ANSWER
input |
---|
12 |
correct output |
---|
377 |
user output |
---|
2049 |
Test 13
Verdict: WRONG ANSWER
input |
---|
13 |
correct output |
---|
610 |
user output |
---|
4097 |
Test 14
Verdict: WRONG ANSWER
input |
---|
14 |
correct output |
---|
987 |
user output |
---|
8193 |
Test 15
Verdict: WRONG ANSWER
input |
---|
15 |
correct output |
---|
1597 |
user output |
---|
16385 |
Test 16
Verdict: WRONG ANSWER
input |
---|
16 |
correct output |
---|
2584 |
user output |
---|
32769 |
Test 17
Verdict: WRONG ANSWER
input |
---|
17 |
correct output |
---|
4181 |
user output |
---|
65537 |
Test 18
Verdict: WRONG ANSWER
input |
---|
18 |
correct output |
---|
6765 |
user output |
---|
131073 |
Test 19
Verdict: WRONG ANSWER
input |
---|
19 |
correct output |
---|
10946 |
user output |
---|
262145 |
Test 20
Verdict: WRONG ANSWER
input |
---|
20 |
correct output |
---|
17711 |
user output |
---|
524289 |
Test 21
Verdict: TIME LIMIT EXCEEDED
input |
---|
30 |
correct output |
---|
2178309 |
user output |
---|
(empty) |
Test 22
Verdict: TIME LIMIT EXCEEDED
input |
---|
40 |
correct output |
---|
267914296 |
user output |
---|
(empty) |
Test 23
Verdict: TIME LIMIT EXCEEDED
input |
---|
50 |
correct output |
---|
9216450 |
user output |
---|
(empty) |
Test 24
Verdict: TIME LIMIT EXCEEDED
input |
---|
60 |
correct output |
---|
865709054 |
user output |
---|
(empty) |
Test 25
Verdict: TIME LIMIT EXCEEDED
input |
---|
70 |
correct output |
---|
659095774 |
user output |
---|
(empty) |
Test 26
Verdict: TIME LIMIT EXCEEDED
input |
---|
80 |
correct output |
---|
343522908 |
user output |
---|
(empty) |
Test 27
Verdict: TIME LIMIT EXCEEDED
input |
---|
90 |
correct output |
---|
666203437 |
user output |
---|
(empty) |
Test 28
Verdict: TIME LIMIT EXCEEDED
input |
---|
100 |
correct output |
---|
741707250 |
user output |
---|
(empty) |
Test 29
Verdict: TIME LIMIT EXCEEDED
input |
---|
200 |
correct output |
---|
319277240 |
user output |
---|
(empty) |
Test 30
Verdict: TIME LIMIT EXCEEDED
input |
---|
300 |
correct output |
---|
12089690 |
user output |
---|
(empty) |
Test 31
Verdict: TIME LIMIT EXCEEDED
input |
---|
400 |
correct output |
---|
356073916 |
user output |
---|
(empty) |
Test 32
Verdict: TIME LIMIT EXCEEDED
input |
---|
500 |
correct output |
---|
831535149 |
user output |
---|
(empty) |
Test 33
Verdict: TIME LIMIT EXCEEDED
input |
---|
600 |
correct output |
---|
627858041 |
user output |
---|
(empty) |
Test 34
Verdict: TIME LIMIT EXCEEDED
input |
---|
700 |
correct output |
---|
894762479 |
user output |
---|
(empty) |
Test 35
Verdict: TIME LIMIT EXCEEDED
input |
---|
800 |
correct output |
---|
695610340 |
user output |
---|
(empty) |
Test 36
Verdict: TIME LIMIT EXCEEDED
input |
---|
900 |
correct output |
---|
120428339 |
user output |
---|
(empty) |
Test 37
Verdict: TIME LIMIT EXCEEDED
input |
---|
1000 |
correct output |
---|
506723686 |
user output |
---|
(empty) |
Test 38
Verdict: TIME LIMIT EXCEEDED
input |
---|
2000 |
correct output |
---|
118272245 |
user output |
---|
(empty) |
Test 39
Verdict: TIME LIMIT EXCEEDED
input |
---|
3000 |
correct output |
---|
50602578 |
user output |
---|
(empty) |
Test 40
Verdict: TIME LIMIT EXCEEDED
input |
---|
4000 |
correct output |
---|
38687300 |
user output |
---|
(empty) |
Test 41
Verdict: TIME LIMIT EXCEEDED
input |
---|
5000 |
correct output |
---|
644069919 |
user output |
---|
(empty) |
Test 42
Verdict: TIME LIMIT EXCEEDED
input |
---|
6000 |
correct output |
---|
905964874 |
user output |
---|
(empty) |
Test 43
Verdict: TIME LIMIT EXCEEDED
input |
---|
7000 |
correct output |
---|
917351342 |
user output |
---|
(empty) |
Test 44
Verdict: TIME LIMIT EXCEEDED
input |
---|
8000 |
correct output |
---|
606465604 |
user output |
---|
(empty) |
Test 45
Verdict: TIME LIMIT EXCEEDED
input |
---|
9000 |
correct output |
---|
676429656 |
user output |
---|
(empty) |
Test 46
Verdict: TIME LIMIT EXCEEDED
input |
---|
10000 |
correct output |
---|
634342956 |
user output |
---|
(empty) |
Test 47
Verdict: TIME LIMIT EXCEEDED
input |
---|
20000 |
correct output |
---|
215568895 |
user output |
---|
(empty) |
Test 48
Verdict: TIME LIMIT EXCEEDED
input |
---|
30000 |
correct output |
---|
54808147 |
user output |
---|
(empty) |
Test 49
Verdict: TIME LIMIT EXCEEDED
input |
---|
40000 |
correct output |
---|
242971895 |
user output |
---|
(empty) |
Test 50
Verdict: TIME LIMIT EXCEEDED
input |
---|
50000 |
correct output |
---|
575576968 |
user output |
---|
(empty) |
Test 51
Verdict: TIME LIMIT EXCEEDED
input |
---|
60000 |
correct output |
---|
923159168 |
user output |
---|
(empty) |
Test 52
Verdict: TIME LIMIT EXCEEDED
input |
---|
70000 |
correct output |
---|
621454924 |
user output |
---|
(empty) |
Test 53
Verdict: TIME LIMIT EXCEEDED
input |
---|
80000 |
correct output |
---|
562709198 |
user output |
---|
(empty) |
Test 54
Verdict: TIME LIMIT EXCEEDED
input |
---|
90000 |
correct output |
---|
389404104 |
user output |
---|
(empty) |
Test 55
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 |
correct output |
---|
66655788 |
user output |
---|
(empty) |