Please sign in first.
Submission #6192818
Source Code Expand
import random
random.seed(12333)
n=int(raw_input())
s=[]
for a in range(1,n+1)[::-1]:
for b in xrange(a+1,n+1):
s.append((a,b))
#random.shuffle(s)
g={}
u=0
cn=0
for t in xrange(0,len(s)):
if s[t][0]==1 or s[t][1]==1:
u=(10**11)
x=s[t][0]+s[t][1]-1
for p in xrange(1,n+1):
if (x,p) in g:
u-=g[(x,p)]
else:
u=1<<cn
cn+=1
g[s[t]]=u
g[(s[t][1],s[t][0])]=u
for a in xrange(1,n+1):
s=''
for b in xrange(1,n+1):
if a==b:
s=s+'0 '
else:
s=s+str(g[(a,b)])+' '
print s
Submission Info
| Submission Time | |
|---|---|
| Task | F - Diverta City |
| User | fjzzq2002 |
| Language | Python (2.7.6) |
| Score | 0 |
| Code Size | 636 Byte |
| Status | WA |
| Exec Time | 13 ms |
| Memory | 2936 KiB |
Judge Result
| Set Name | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 900 | ||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt |
| All | in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, sample_01.txt, sample_02.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| in1.txt | AC | 12 ms | 2936 KiB |
| in2.txt | WA | 12 ms | 2936 KiB |
| in3.txt | WA | 13 ms | 2936 KiB |
| in4.txt | WA | 12 ms | 2936 KiB |
| in5.txt | WA | 12 ms | 2936 KiB |
| in6.txt | WA | 12 ms | 2936 KiB |
| in7.txt | WA | 12 ms | 2936 KiB |
| sample_01.txt | WA | 12 ms | 2936 KiB |
| sample_02.txt | WA | 12 ms | 2936 KiB |