Submission #419462
Source Code Expand
N, Q = map(int, input().split()) table = [list(map(int, input().split())) for _ in range(Q)] for elem in table: a, b, s, t = elem if a <= s < t <= b: print(0) elif s <= a < b <= t: print(100 * (t - s - (b - a))) elif a <= s < b: print(100 * (t - s - (b - s))) elif a < t <= b: print(100 * (t - s - (t - a))) else: print(100 * (t - s))
Submission Info
Submission Time | |
---|---|
Task | D - 定期券 |
User | yumechi |
Language | Python (3.2.3) |
Score | 100 |
Code Size | 365 Byte |
Status | AC |
Exec Time | 1684 ms |
Memory | 40008 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | large_01.txt, large_02.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, small_01.txt, small_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
large_01.txt | AC | 893 ms | 24092 KB |
large_02.txt | AC | 1621 ms | 36760 KB |
random_01.txt | AC | 1624 ms | 39964 KB |
random_02.txt | AC | 1629 ms | 39996 KB |
random_03.txt | AC | 1613 ms | 40008 KB |
random_04.txt | AC | 1576 ms | 39960 KB |
random_05.txt | AC | 1599 ms | 39964 KB |
random_06.txt | AC | 1588 ms | 39964 KB |
random_07.txt | AC | 1618 ms | 39956 KB |
random_08.txt | AC | 1684 ms | 39964 KB |
random_09.txt | AC | 1640 ms | 39960 KB |
random_10.txt | AC | 1669 ms | 39988 KB |
sample_01.txt | AC | 130 ms | 8368 KB |
sample_02.txt | AC | 129 ms | 8368 KB |
small_01.txt | AC | 137 ms | 8412 KB |
small_02.txt | AC | 139 ms | 8368 KB |