Submission #3339646
Source Code Expand
n = int(input()) a = [('a',int(input())) for _ in range(n)] b = [('b',int(input()))for _ in range(n)] ab = sorted(a+b, key=lambda x: x[1]) m = [] count = 0 for k,i in ab: if k == 'a': if count < 0: m.append(-count) count += 1 else: if count > 0: m.append(count) count -= 1 from itertools import accumulate as acc from operator import mul print(list(acc(m, mul))[-1])
Submission Info
Submission Time | |
---|---|
Task | A - 1D Matching |
User | krswrb |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 449 Byte |
Status | WA |
Exec Time | 2264 ms |
Memory | 1715408 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 | MLE | 1926 ms | 1715408 KB |
001.txt | WA | 314 ms | 192456 KB |
002.txt | MLE | 487 ms | 344664 KB |
003.txt | MLE | 576 ms | 422212 KB |
004.txt | TLE | 2259 ms | -1912688 KB |
005.txt | TLE | 2257 ms | -1981236 KB |
006.txt | TLE | 2253 ms | -1978120 KB |
007.txt | TLE | 2250 ms | -1999416 KB |
008.txt | TLE | 2263 ms | -1978344 KB |
009.txt | TLE | 2264 ms | -1975900 KB |
010.txt | TLE | 2263 ms | -1981972 KB |
011.txt | AC | 577 ms | 29924 KB |
example0.txt | AC | 18 ms | 3064 KB |
example1.txt | AC | 18 ms | 3060 KB |