Submission #2407542
Source Code Expand
n=int(input()) red=[list(map(int,input().split()))for i in range(n)] blue=[list(map(int,input().split()))for i in range(n)] red.sort(reverse=True)#降順に並び替える blue.sort(key=lambda x:x[1])#y座標を基準にソート ans=0 for i in range(n): redx,redy=red[i][0],red[i][1] for j in range(len(blue)): bluex,bluey=blue[j][0],blue[j][1] if redx<bluex and redy<bluey: ans+=1 blue.pop(j) break print(ans)
Submission Info
Submission Time | |
---|---|
Task | C - 2D Plane 2N Points |
User | dexctercom |
Language | Python (3.4.3) |
Score | 400 |
Code Size | 487 Byte |
Status | AC |
Exec Time | 20 ms |
Memory | 3064 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example_0, example_1, example_2, example_3, example_4 |
All | example_0, example_1, example_2, example_3, example_4, line_0, line_1, line_2, line_3, maxrand_0, maxrand_1, maxrand_2, maxrand_3, maxrand_4, rand_0, rand_1, rand_2 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
example_0 | AC | 17 ms | 3064 KB |
example_1 | AC | 17 ms | 3064 KB |
example_2 | AC | 17 ms | 3064 KB |
example_3 | AC | 17 ms | 3064 KB |
example_4 | AC | 17 ms | 3064 KB |
line_0 | AC | 17 ms | 3064 KB |
line_1 | AC | 20 ms | 3064 KB |
line_2 | AC | 18 ms | 3064 KB |
line_3 | AC | 18 ms | 3064 KB |
maxrand_0 | AC | 19 ms | 3064 KB |
maxrand_1 | AC | 18 ms | 3064 KB |
maxrand_2 | AC | 19 ms | 3064 KB |
maxrand_3 | AC | 19 ms | 3064 KB |
maxrand_4 | AC | 19 ms | 3064 KB |
rand_0 | AC | 19 ms | 3064 KB |
rand_1 | AC | 18 ms | 3064 KB |
rand_2 | AC | 18 ms | 3064 KB |