Task: | Ruudukko |
Sender: | tassu |
Submission time: | 2019-09-30 13:45:04 +0300 |
Language: | Python2 (CPython2) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.02 s | details |
#2 | ACCEPTED | 0.02 s | details |
#3 | WRONG ANSWER | 0.02 s | details |
#4 | WRONG ANSWER | 0.03 s | details |
#5 | WRONG ANSWER | 0.19 s | details |
#6 | WRONG ANSWER | 0.20 s | details |
Code
size = int(input()) list_of_lists = [([0] * size) for _ in range(size)] list_of_lists[0][0] = 1 for i in range(size): list_of_lists[i][i] = 1 list_of_lists[0][i] = i + 1 list_of_lists[i][0] = i + 1 for i in range(1, size): for j in range(1, size): if i == j: continue used_numbers = [] for smaller_i in range(i): used_numbers.append(list_of_lists[smaller_i][j]) min_j = 100000 for smaller_j in range(j): used_numbers.append(list_of_lists[i][smaller_j]) # print(i, j, used_numbers) min_number = min(used_numbers) if min_number == 1 or min_number == 0 or min_number == 2: list_of_lists[i][j] = max(used_numbers) + 1 else: list_of_lists[i][j] = min_number - 1 for foo in list_of_lists: for char in foo: print(char), print ""
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 |
correct output |
---|
1 |
user output |
---|
1 |
Test 2
Verdict: ACCEPTED
input |
---|
2 |
correct output |
---|
1 2 2 1 |
user output |
---|
1 2 2 1 |
Test 3
Verdict: WRONG ANSWER
input |
---|
5 |
correct output |
---|
1 2 3 4 5 2 1 4 3 6 3 4 1 2 7 4 3 2 1 8 5 6 7 8 1 |
user output |
---|
1 2 3 4 5 2 1 4 5 6 3 4 1 6 7 4 5 6 1 8 5 6 7 8 1 |
Test 4
Verdict: WRONG ANSWER
input |
---|
42 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 5
Verdict: WRONG ANSWER
input |
---|
99 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 6
Verdict: WRONG ANSWER
input |
---|
100 |
correct output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |