Submission #1612452
Source Code Expand
n = int(input()) a = sorted([int(input()) for i in range(n)]) b = sorted([int(input()) for i in range(n)]) ans = 1 MOD = 1000000007 cnt = 0 for i in range(n - 1): if a[i + 1] < b[i]: cnt += 1 else: ans *= pow(2, cnt, MOD) ans %= MOD cnt = 0 ans *= pow(2, cnt, MOD) ans %= MOD print(ans)
Submission Info
Submission Time | |
---|---|
Task | A - 1D Matching |
User | fine |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 349 Byte |
Status | WA |
Exec Time | 449 ms |
Memory | 12100 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 | WA | 266 ms | 8536 KB |
001.txt | WA | 102 ms | 4960 KB |
002.txt | WA | 136 ms | 5808 KB |
003.txt | WA | 152 ms | 6032 KB |
004.txt | WA | 394 ms | 11084 KB |
005.txt | WA | 418 ms | 12092 KB |
006.txt | WA | 424 ms | 12028 KB |
007.txt | WA | 439 ms | 12096 KB |
008.txt | WA | 435 ms | 12092 KB |
009.txt | WA | 414 ms | 12096 KB |
010.txt | WA | 439 ms | 12100 KB |
011.txt | AC | 449 ms | 12088 KB |
example0.txt | AC | 17 ms | 3060 KB |
example1.txt | AC | 17 ms | 3064 KB |