Submission #4064197
Source Code Expand
import math n=int(input()) a=[[int(input()),1] for i in range(n)]+[[int(input()),-1] for i in range(n)] a.sort() c=0 b=a[0][1] d=[] for i,j in a: if j!=b and c*j<0:d.append(abs(c)) c+=j b=j print(d,c,r) ans=1 for i in d: ans*=math.factorial(i) print(ans)
Submission Info
Submission Time | |
---|---|
Task | A - 1D Matching |
User | chun1182 |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 289 Byte |
Status | RE |
Exec Time | 741 ms |
Memory | 31344 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 500 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0.txt, example1.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, example0.txt, example1.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | RE | 399 ms | 20228 KB |
001.txt | RE | 146 ms | 9244 KB |
002.txt | RE | 196 ms | 11644 KB |
003.txt | RE | 216 ms | 12648 KB |
004.txt | RE | 604 ms | 28304 KB |
005.txt | RE | 741 ms | 31340 KB |
006.txt | RE | 702 ms | 31336 KB |
007.txt | RE | 709 ms | 31340 KB |
008.txt | RE | 707 ms | 31340 KB |
009.txt | RE | 722 ms | 31340 KB |
010.txt | RE | 638 ms | 31340 KB |
011.txt | RE | 737 ms | 31344 KB |
example0.txt | RE | 18 ms | 3064 KB |
example1.txt | RE | 18 ms | 3064 KB |