Submission #5030157
Source Code Expand
# AGC032 Problem-B
n = int(input())
table = [[ 1 for i in range(0, n)] for j in range (0,n)]
#print (table)
if n % 2 == 1 : # odd
m = n-2
else :
m = n-1
for i in range (0, n) :
table[i][m-i] = 0
#print (table)
print (n*(n-1)//2 - n//2 )
for i in range (0,n):
for j in range (0,i):
if table[i][j] ==1 :
print (i+1, j+1)
Submission Info
| Submission Time | |
|---|---|
| Task | B - Balanced Neighbors |
| User | Cummin |
| Language | Python (3.4.3) |
| Score | 700 |
| Code Size | 389 Byte |
| Status | AC |
| Exec Time | 24 ms |
| Memory | 3700 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 700 / 700 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt |
| All | sample_01.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| sample_01.txt | AC | 17 ms | 3060 KiB |
| test_01.txt | AC | 17 ms | 2940 KiB |
| test_02.txt | AC | 17 ms | 3060 KiB |
| test_03.txt | AC | 17 ms | 3060 KiB |
| test_04.txt | AC | 17 ms | 2940 KiB |
| test_05.txt | AC | 24 ms | 3700 KiB |
| test_06.txt | AC | 24 ms | 3700 KiB |
| test_07.txt | AC | 23 ms | 3700 KiB |
| test_08.txt | AC | 23 ms | 3632 KiB |
| test_09.txt | AC | 18 ms | 3060 KiB |
| test_10.txt | AC | 18 ms | 3060 KiB |
| test_11.txt | AC | 18 ms | 3060 KiB |
| test_12.txt | AC | 18 ms | 3060 KiB |