Task: | LumberUolevi |
Sender: | aalto2024a_002 |
Submission time: | 2024-09-04 16:46:58 +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 | ACCEPTED | 0.00 s | details |
#6 | ACCEPTED | 0.00 s | details |
#7 | ACCEPTED | 0.00 s | details |
#8 | ACCEPTED | 0.00 s | details |
#9 | ACCEPTED | 0.00 s | details |
#10 | ACCEPTED | 0.00 s | details |
#11 | WRONG ANSWER | 0.00 s | details |
#12 | ACCEPTED | 0.00 s | details |
#13 | ACCEPTED | 0.00 s | details |
#14 | WRONG ANSWER | 0.00 s | details |
#15 | WRONG ANSWER | 0.00 s | details |
#16 | ACCEPTED | 0.00 s | details |
#17 | WRONG ANSWER | 0.00 s | details |
#18 | ACCEPTED | 0.00 s | details |
#19 | WRONG ANSWER | 0.00 s | details |
#20 | ACCEPTED | 0.00 s | details |
#21 | ACCEPTED | 0.00 s | details |
#22 | ACCEPTED | 0.00 s | details |
#23 | WRONG ANSWER | 0.00 s | details |
#24 | WRONG ANSWER | 0.00 s | details |
#25 | WRONG ANSWER | 0.00 s | details |
#26 | ACCEPTED | 0.00 s | details |
#27 | ACCEPTED | 0.00 s | details |
#28 | WRONG ANSWER | 0.00 s | details |
#29 | WRONG ANSWER | 0.00 s | details |
#30 | ACCEPTED | 0.00 s | details |
#31 | WRONG ANSWER | 0.00 s | details |
#32 | WRONG ANSWER | 0.00 s | details |
#33 | WRONG ANSWER | 0.00 s | details |
#34 | WRONG ANSWER | 0.00 s | details |
#35 | WRONG ANSWER | 0.00 s | details |
#36 | WRONG ANSWER | 0.00 s | details |
#37 | WRONG ANSWER | 0.00 s | details |
#38 | WRONG ANSWER | 0.00 s | details |
#39 | ACCEPTED | 0.00 s | details |
#40 | ACCEPTED | 0.00 s | details |
#41 | ACCEPTED | 0.00 s | details |
#42 | WRONG ANSWER | 0.00 s | details |
#43 | WRONG ANSWER | 0.00 s | details |
#44 | WRONG ANSWER | 0.00 s | details |
#45 | WRONG ANSWER | 0.00 s | details |
#46 | WRONG ANSWER | 0.00 s | details |
#47 | ACCEPTED | 0.00 s | details |
#48 | ACCEPTED | 0.00 s | details |
#49 | ACCEPTED | 0.00 s | details |
#50 | WRONG ANSWER | 0.00 s | details |
#51 | WRONG ANSWER | 0.01 s | details |
#52 | ACCEPTED | 0.01 s | details |
#53 | WRONG ANSWER | 0.01 s | details |
#54 | WRONG ANSWER | 0.00 s | details |
#55 | WRONG ANSWER | 0.01 s | details |
#56 | WRONG ANSWER | 0.01 s | details |
#57 | ACCEPTED | 0.01 s | details |
#58 | ACCEPTED | 0.00 s | details |
#59 | WRONG ANSWER | 0.01 s | details |
#60 | WRONG ANSWER | 0.00 s | details |
#61 | WRONG ANSWER | 0.01 s | details |
#62 | ACCEPTED | 0.01 s | details |
#63 | ACCEPTED | 0.01 s | details |
Compiler report
input/code.cpp: In function 'int main(int, char**)': input/code.cpp:8:13: warning: unused variable 'res' [-Wunused-variable] 8 | int res = scanf("%d %d", &n, &k); | ^~~
Code
#include <iostream> using namespace std; int main(int argc, char *argv[]) { int n, k; int res = scanf("%d %d", &n, &k); cout << n << " "; if (k % 2 == 1) { for (int i = 1; i < k; i += 2) { cout << i << " " << n - i << " "; } } else { int i; for (i = 1; i < k - 1; i += 2) { cout << i << " " << n - i << " "; } cout << i - 1; } return 0; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 1 |
correct output |
---|
1 |
user output |
---|
1 |
Test 2
Verdict: ACCEPTED
input |
---|
2 1 |
correct output |
---|
2 |
user output |
---|
2 |
Test 3
Verdict: ACCEPTED
input |
---|
2 1 |
correct output |
---|
2 |
user output |
---|
2 |
Test 4
Verdict: WRONG ANSWER
input |
---|
3 2 |
correct output |
---|
1 2 |
user output |
---|
3 0 |
Test 5
Verdict: ACCEPTED
input |
---|
3 3 |
correct output |
---|
1 2 3 |
user output |
---|
3 1 2 |
Test 6
Verdict: ACCEPTED
input |
---|
4 1 |
correct output |
---|
4 |
user output |
---|
4 |
Test 7
Verdict: ACCEPTED
input |
---|
4 4 |
correct output |
---|
1 2 3 4 |
user output |
---|
4 1 3 2 |
Test 8
Verdict: ACCEPTED
input |
---|
5 1 |
correct output |
---|
5 |
user output |
---|
5 |
Test 9
Verdict: ACCEPTED
input |
---|
5 5 |
correct output |
---|
1 2 3 4 5 |
user output |
---|
5 1 4 3 2 |
Test 10
Verdict: ACCEPTED
input |
---|
6 1 |
correct output |
---|
6 |
user output |
---|
6 |
Test 11
Verdict: WRONG ANSWER
input |
---|
10 6 |
correct output |
---|
1 2 3 5 9 10 |
user output |
---|
10 1 9 3 7 4 |
Test 12
Verdict: ACCEPTED
input |
---|
10 5 |
correct output |
---|
1 2 3 4 10 |
user output |
---|
10 1 9 3 7 |
Test 13
Verdict: ACCEPTED
input |
---|
10 5 |
correct output |
---|
1 2 3 4 10 |
user output |
---|
10 1 9 3 7 |
Test 14
Verdict: WRONG ANSWER
input |
---|
10 6 |
correct output |
---|
1 2 3 5 9 10 |
user output |
---|
10 1 9 3 7 4 |
Test 15
Verdict: WRONG ANSWER
input |
---|
10 10 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 |
user output |
---|
10 1 9 3 7 5 5 7 3 8 |
Test 16
Verdict: ACCEPTED
input |
---|
11 3 |
correct output |
---|
1 2 8 |
user output |
---|
11 1 10 |
Test 17
Verdict: WRONG ANSWER
input |
---|
11 10 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 |
user output |
---|
11 1 10 3 8 5 6 7 4 8 |
Test 18
Verdict: ACCEPTED
input |
---|
11 1 |
correct output |
---|
11 |
user output |
---|
11 |
Test 19
Verdict: WRONG ANSWER
input |
---|
12 11 |
correct output |
---|
1 2 3 4 5 7 8 9 10 11 12 |
user output |
---|
12 1 11 3 9 5 7 7 5 9 3 |
Test 20
Verdict: ACCEPTED
input |
---|
12 1 |
correct output |
---|
12 |
user output |
---|
12 |
Test 21
Verdict: ACCEPTED
input |
---|
20 11 |
correct output |
---|
1 2 3 4 5 6 7 8 9 15 20 |
user output |
---|
20 1 19 3 17 5 15 7 13 9 11 |
Test 22
Verdict: ACCEPTED
input |
---|
20 9 |
correct output |
---|
1 2 3 4 5 6 7 12 20 |
user output |
---|
20 1 19 3 17 5 15 7 13 |
Test 23
Verdict: WRONG ANSWER
input |
---|
21 10 |
correct output |
---|
1 2 3 4 5 6 7 8 9 18 |
user output |
---|
21 1 20 3 18 5 16 7 14 8 |
Test 24
Verdict: WRONG ANSWER
input |
---|
22 13 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 12 21 22 |
user output |
---|
22 1 21 3 19 5 17 7 15 9 13 11... |
Test 25
Verdict: WRONG ANSWER
input |
---|
20 20 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
20 1 19 3 17 5 15 7 13 9 11 11... |
Test 26
Verdict: ACCEPTED
input |
---|
20 5 |
correct output |
---|
1 2 3 4 10 |
user output |
---|
20 1 19 3 17 |
Test 27
Verdict: ACCEPTED
input |
---|
23 21 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 13 14 15 ... |
user output |
---|
23 1 22 3 20 5 18 7 16 9 14 11... |
Test 28
Verdict: WRONG ANSWER
input |
---|
24 2 |
correct output |
---|
1 23 |
user output |
---|
24 0 |
Test 29
Verdict: WRONG ANSWER
input |
---|
20 18 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
20 1 19 3 17 5 15 7 13 9 11 11... |
Test 30
Verdict: ACCEPTED
input |
---|
25 1 |
correct output |
---|
25 |
user output |
---|
25 |
Test 31
Verdict: WRONG ANSWER
input |
---|
123 68 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
123 1 122 3 120 5 118 7 116 9 ... Truncated |
Test 32
Verdict: WRONG ANSWER
input |
---|
201 84 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
201 1 200 3 198 5 196 7 194 9 ... Truncated |
Test 33
Verdict: WRONG ANSWER
input |
---|
200 88 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
200 1 199 3 197 5 195 7 193 9 ... Truncated |
Test 34
Verdict: WRONG ANSWER
input |
---|
202 112 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
202 1 201 3 199 5 197 7 195 9 ... Truncated |
Test 35
Verdict: WRONG ANSWER
input |
---|
200 194 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
200 1 199 3 197 5 195 7 193 9 ... Truncated |
Test 36
Verdict: WRONG ANSWER
input |
---|
204 46 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
204 1 203 3 201 5 199 7 197 9 ... Truncated |
Test 37
Verdict: WRONG ANSWER
input |
---|
205 184 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
205 1 204 3 202 5 200 7 198 9 ... Truncated |
Test 38
Verdict: WRONG ANSWER
input |
---|
200 16 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
200 1 199 3 197 5 195 7 193 9 ... |
Test 39
Verdict: ACCEPTED
input |
---|
207 181 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
207 1 206 3 204 5 202 7 200 9 ... Truncated |
Test 40
Verdict: ACCEPTED
input |
---|
201 3 |
correct output |
---|
1 2 198 |
user output |
---|
201 1 200 |
Test 41
Verdict: ACCEPTED
input |
---|
1123 617 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
1123 1 1122 3 1120 5 1118 7 11... Truncated |
Test 42
Verdict: WRONG ANSWER
input |
---|
2201 918 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
2201 1 2200 3 2198 5 2196 7 21... Truncated |
Test 43
Verdict: WRONG ANSWER
input |
---|
3200 1396 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
3200 1 3199 3 3197 5 3195 7 31... Truncated |
Test 44
Verdict: WRONG ANSWER
input |
---|
2202 1213 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
2202 1 2201 3 2199 5 2197 7 21... Truncated |
Test 45
Verdict: WRONG ANSWER
input |
---|
1200 1161 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
1200 1 1199 3 1197 5 1195 7 11... Truncated |
Test 46
Verdict: WRONG ANSWER
input |
---|
5204 1156 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
5204 1 5203 3 5201 5 5199 7 51... Truncated |
Test 47
Verdict: ACCEPTED
input |
---|
6205 5541 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
6205 1 6204 3 6202 5 6200 7 61... Truncated |
Test 48
Verdict: ACCEPTED
input |
---|
3200 245 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
3200 1 3199 3 3197 5 3195 7 31... Truncated |
Test 49
Verdict: ACCEPTED
input |
---|
7207 6295 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
7207 1 7206 3 7204 5 7202 7 72... Truncated |
Test 50
Verdict: WRONG ANSWER
input |
---|
9201 96 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
9201 1 9200 3 9198 5 9196 7 91... Truncated |
Test 51
Verdict: WRONG ANSWER
input |
---|
51123 28058 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
51123 1 51122 3 51120 5 51118 ... Truncated |
Test 52
Verdict: ACCEPTED
input |
---|
32201 13429 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
32201 1 32200 3 32198 5 32196 ... Truncated |
Test 53
Verdict: WRONG ANSWER
input |
---|
23200 10116 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
23200 1 23199 3 23197 5 23195 ... Truncated |
Test 54
Verdict: WRONG ANSWER
input |
---|
12202 6721 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
12202 1 12201 3 12199 5 12197 ... Truncated |
Test 55
Verdict: WRONG ANSWER
input |
---|
21200 20502 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
21200 1 21199 3 21197 5 21195 ... Truncated |
Test 56
Verdict: WRONG ANSWER
input |
---|
35204 7816 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
35204 1 35203 3 35201 5 35199 ... Truncated |
Test 57
Verdict: ACCEPTED
input |
---|
46205 41255 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
46205 1 46204 3 46202 5 46200 ... Truncated |
Test 58
Verdict: ACCEPTED
input |
---|
63200 4823 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
63200 1 63199 3 63197 5 63195 ... Truncated |
Test 59
Verdict: WRONG ANSWER
input |
---|
87207 76170 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
87207 1 87206 3 87204 5 87202 ... Truncated |
Test 60
Verdict: WRONG ANSWER
input |
---|
99201 1030 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
99201 1 99200 3 99198 5 99196 ... Truncated |
Test 61
Verdict: WRONG ANSWER
input |
---|
100000 54883 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
100000 1 99999 3 99997 5 99995... Truncated |
Test 62
Verdict: ACCEPTED
input |
---|
100000 41703 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
100000 1 99999 3 99997 5 99995... Truncated |
Test 63
Verdict: ACCEPTED
input |
---|
100000 43601 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
100000 1 99999 3 99997 5 99995... Truncated |