Submission #4135030
Source Code Expand
N = int(input()) L = [] for i in range(N): L.append((int(input()),'a')) for i in range(N): L.append((int(input()),'b')) L.sort() res = 1 cc = 0 nowcol = None mo = 1000000007 for i in range(2*N): if cc == 0: nowcol=L[i][1] if nowcol == L[i][1]: cc += 1 else: res *= cc res %= mo cc -= 1 print(res)
Submission Info
Submission Time | |
---|---|
Task | A - 1D Matching |
User | hagebooi |
Language | Python (3.4.3) |
Score | 500 |
Code Size | 348 Byte |
Status | AC |
Exec Time | 675 ms |
Memory | 24512 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 500 / 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 | AC | 393 ms | 15984 KB |
001.txt | AC | 144 ms | 7752 KB |
002.txt | AC | 194 ms | 9640 KB |
003.txt | AC | 215 ms | 10376 KB |
004.txt | AC | 582 ms | 22196 KB |
005.txt | AC | 664 ms | 24448 KB |
006.txt | AC | 675 ms | 24512 KB |
007.txt | AC | 665 ms | 24432 KB |
008.txt | AC | 669 ms | 24508 KB |
009.txt | AC | 645 ms | 24492 KB |
010.txt | AC | 626 ms | 24448 KB |
011.txt | AC | 653 ms | 24508 KB |
example0.txt | AC | 18 ms | 3064 KB |
example1.txt | AC | 18 ms | 3064 KB |