Submission #3768645
Source Code Expand
N=int(input()) C=[] for i in range(N): C.append((int(input()),"a")) for i in range(N): C.append((int(input()),"b")) C.sort() mod=10**9+7 a,b=0,0 ans=1 for c in C: if c[1]=="a": if b>0: ans=(ans*b)%mod b-=1 else: a+=1 if c[1]=="b": if a>0: ans=(ans*a)%mod a-=1 else: b+=1 print(a,b,ans) print(ans)
Submission Info
Submission Time | |
---|---|
Task | A - 1D Matching |
User | Chanyuh |
Language | PyPy3 (2.4.0) |
Score | 0 |
Code Size | 396 Byte |
Status | WA |
Exec Time | 1747 ms |
Memory | 95576 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 | 1192 ms | 79704 KB |
001.txt | WA | 667 ms | 63448 KB |
002.txt | WA | 736 ms | 66520 KB |
003.txt | WA | 809 ms | 69208 KB |
004.txt | WA | 1530 ms | 87896 KB |
005.txt | WA | 1659 ms | 91992 KB |
006.txt | WA | 1747 ms | 91608 KB |
007.txt | WA | 1683 ms | 91224 KB |
008.txt | WA | 1655 ms | 90712 KB |
009.txt | WA | 1689 ms | 91736 KB |
010.txt | WA | 1624 ms | 88280 KB |
011.txt | WA | 1631 ms | 95576 KB |
example0.txt | WA | 163 ms | 38256 KB |
example1.txt | WA | 171 ms | 38256 KB |