Task: | Ratsun reitit |
Sender: | Kemil |
Submission time: | 2020-10-01 14:35:00 +0300 |
Language: | C++ (C++17) |
Status: | READY |
Result: | 27 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 27 |
#2 | WRONG ANSWER | 0 |
#3 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.01 s | 1, 2, 3 | details |
#2 | ACCEPTED | 0.01 s | 1, 2, 3 | details |
#3 | ACCEPTED | 0.01 s | 1, 2, 3 | details |
#4 | ACCEPTED | 0.01 s | 1, 2, 3 | details |
#5 | ACCEPTED | 0.01 s | 1, 2, 3 | details |
#6 | ACCEPTED | 0.01 s | 1, 2, 3 | details |
#7 | ACCEPTED | 0.01 s | 1, 2, 3 | details |
#8 | WRONG ANSWER | 0.01 s | 2, 3 | details |
#9 | RUNTIME ERROR | 0.01 s | 2, 3 | details |
#10 | RUNTIME ERROR | 0.01 s | 2, 3 | details |
#11 | RUNTIME ERROR | 0.01 s | 3 | details |
#12 | RUNTIME ERROR | 0.01 s | 3 | details |
#13 | RUNTIME ERROR | 0.01 s | 3 | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:23:6: warning: unused variable 'Base' [-Wunused-variable] int Base[5][5] = ^~~~
Code
#include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; int Grid[10][10] = { {0, 3, 2, 3, 2, 3, 4, 5, 4, 5}, {3, 4, 1, 2, 3, 4, 3, 4, 5, 6}, {2, 1, 4, 3, 2, 3, 4, 5, 4, 5 }, {3, 2, 3, 2, 3, 4, 3, 4, 5, 6}, {2, 3, 2, 3, 4, 3, 4, 5, 4, 5}, {3, 4, 3, 4, 3, 4, 5, 4, 5, 6}, {4, 3, 4, 3, 4, 5, 4, 5, 6, 5}, {5, 4, 5, 4, 5, 4, 5, 6, 5, 6}, {4, 5, 4, 5, 4, 5, 6, 5, 6, 7}, {5, 6, 5, 6, 5, 6, 5, 6, 7, 6} }; int Base[5][5] = { {0,3,2,3,2}, {3,4,1,2,3}, {2,1,4,3,2}, {3,2,3,2,3}, {2,3,2,3,4} }; if (n == 4) { int Case4[4][4] = { {0, 3, 2, 5}, {3, 4, 1, 2}, {2, 1, 4, 3}, {5, 2, 3, 2} }; for (int i = 0; i < n; i++) { string MyString = to_string(Case4[i][0]); for (int j = 1; j < n; j++) { MyString = MyString + " " + to_string(Case4[i][j]); } cout << MyString << endl; } } else { /* for (int j = 0; j < 5; j++) { for (int k = 0; k < 5; k++) { Grid[j][k] = Base[j][k]; } } for (int y = 5; y < n; y++) { Grid[y][0] = Grid[y - 2][1] + 1; Grid[0][y] = Grid[1][y - 2] + 1; for (int x = 1; x <= y; x++) { Grid[y][x] = Grid[y - 2][x - 1] + 1; Grid[x][y] = Grid[y - 2][x - 1] + 1; } } */ for (int i = 0; i < n; i++) { string MyString = to_string(Grid[i][0]); for (int j = 1; j < n; j++) { MyString = MyString + +" " + to_string(Grid[i][j]); } cout << MyString<<endl; } } }
Test details
Test 1
Group: 1, 2, 3
Verdict: ACCEPTED
input |
---|
4 |
correct output |
---|
0 3 2 5 3 4 1 2 2 1 4 3 5 2 3 2 |
user output |
---|
0 3 2 5 3 4 1 2 2 1 4 3 5 2 3 2 |
Test 2
Group: 1, 2, 3
Verdict: ACCEPTED
input |
---|
5 |
correct output |
---|
0 3 2 3 2 3 4 1 2 3 2 1 4 3 2 3 2 3 2 3 2 3 2 3 4 |
user output |
---|
0 3 2 3 2 3 4 1 2 3 2 1 4 3 2 3 2 3 2 3 2 3 2 3 4 |
Test 3
Group: 1, 2, 3
Verdict: ACCEPTED
input |
---|
6 |
correct output |
---|
0 3 2 3 2 3 3 4 1 2 3 4 2 1 4 3 2 3 3 2 3 2 3 4 2 3 2 3 4 3 ... |
user output |
---|
0 3 2 3 2 3 3 4 1 2 3 4 2 1 4 3 2 3 3 2 3 2 3 4 2 3 2 3 4 3 ... |
Test 4
Group: 1, 2, 3
Verdict: ACCEPTED
input |
---|
7 |
correct output |
---|
0 3 2 3 2 3 4 3 4 1 2 3 4 3 2 1 4 3 2 3 4 3 2 3 2 3 4 3 2 3 2 3 4 3 4 ... |
user output |
---|
0 3 2 3 2 3 4 3 4 1 2 3 4 3 2 1 4 3 2 3 4 3 2 3 2 3 4 3 2 3 2 3 4 3 4 ... Truncated |
Test 5
Group: 1, 2, 3
Verdict: ACCEPTED
input |
---|
8 |
correct output |
---|
0 3 2 3 2 3 4 5 3 4 1 2 3 4 3 4 2 1 4 3 2 3 4 5 3 2 3 2 3 4 3 4 2 3 2 3 4 3 4 5 ... |
user output |
---|
0 3 2 3 2 3 4 5 3 4 1 2 3 4 3 4 2 1 4 3 2 3 4 5 3 2 3 2 3 4 3 4 2 3 2 3 4 3 4 5 ... Truncated |
Test 6
Group: 1, 2, 3
Verdict: ACCEPTED
input |
---|
9 |
correct output |
---|
0 3 2 3 2 3 4 5 4 3 4 1 2 3 4 3 4 5 2 1 4 3 2 3 4 5 4 3 2 3 2 3 4 3 4 5 2 3 2 3 4 3 4 5 4 ... |
user output |
---|
0 3 2 3 2 3 4 5 4 3 4 1 2 3 4 3 4 5 2 1 4 3 2 3 4 5 4 3 2 3 2 3 4 3 4 5 2 3 2 3 4 3 4 5 4 ... Truncated |
Test 7
Group: 1, 2, 3
Verdict: ACCEPTED
input |
---|
10 |
correct output |
---|
0 3 2 3 2 3 4 5 4 5 3 4 1 2 3 4 3 4 5 6 2 1 4 3 2 3 4 5 4 5 3 2 3 2 3 4 3 4 5 6 2 3 2 3 4 3 4 5 4 5 ... |
user output |
---|
0 3 2 3 2 3 4 5 4 5 3 4 1 2 3 4 3 4 5 6 2 1 4 3 2 3 4 5 4 5 3 2 3 2 3 4 3 4 5 6 2 3 2 3 4 ... Truncated |
Test 8
Group: 2, 3
Verdict: WRONG ANSWER
input |
---|
25 |
correct output |
---|
0 3 2 3 2 3 4 5 4 5 6 7 6 7 8 ... |
user output |
---|
0 3 2 3 2 3 4 5 4 5 3 4 1 2 3 ... Truncated |
Test 9
Group: 2, 3
Verdict: RUNTIME ERROR
input |
---|
49 |
correct output |
---|
0 3 2 3 2 3 4 5 4 5 6 7 6 7 8 ... |
user output |
---|
0 3 2 3 2 3 4 5 4 5 3 4 1 2 3 ... Truncated |
Test 10
Group: 2, 3
Verdict: RUNTIME ERROR
input |
---|
50 |
correct output |
---|
0 3 2 3 2 3 4 5 4 5 6 7 6 7 8 ... |
user output |
---|
0 3 2 3 2 3 4 5 4 5 3 4 1 2 3 ... Truncated |
Test 11
Group: 3
Verdict: RUNTIME ERROR
input |
---|
75 |
correct output |
---|
0 3 2 3 2 3 4 5 4 5 6 7 6 7 8 ... |
user output |
---|
0 3 2 3 2 3 4 5 4 5 3 4 1 2 3 ... Truncated |
Test 12
Group: 3
Verdict: RUNTIME ERROR
input |
---|
99 |
correct output |
---|
0 3 2 3 2 3 4 5 4 5 6 7 6 7 8 ... |
user output |
---|
0 3 2 3 2 3 4 5 4 5 3 4 1 2 3 ... Truncated |
Test 13
Group: 3
Verdict: RUNTIME ERROR
input |
---|
100 |
correct output |
---|
0 3 2 3 2 3 4 5 4 5 6 7 6 7 8 ... |
user output |
---|
0 3 2 3 2 3 4 5 4 5 3 4 1 2 3 ... Truncated |