Submission #1573930
Source Code Expand
#include "iostream" #include "climits" #include "list" #include "queue" #include "stack" #include "set" #include "functional" #include "algorithm" #include "string" #include "map" #include "iomanip" #include "random" using namespace std; const long long int MOD = 1000000007; const long double EPS = 0.00000001; const long double PI = 3.1415926535897932384626433; long long int N, M, K, L, R, H, W; int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> N >> M; for (int i = 0; i < M; i++) { cin >> H >> W >> L >> R; if (W <= L || H >= R) { cout << (R - L) * 100 << endl; } else if (H > L&&W < R) { cout << (R - L - W + H) * 100 << endl; } else if (H <= L&&W >= R) { cout << "0\n"; } else if (H < L&&W > L) { cout << (R - W) * 100 << endl; } else if (L < H&&R > H) { cout << (H - L) * 100 << endl; } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | D - 定期券 |
User | olphe |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 926 Byte |
Status | WA |
Exec Time | 184 ms |
Memory | 1024 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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, sample_01.txt, sample_02.txt, small_01.txt, small_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
large_01.txt | WA | 94 ms | 640 KB |
large_02.txt | WA | 184 ms | 1024 KB |
random_01.txt | WA | 164 ms | 896 KB |
random_02.txt | WA | 167 ms | 896 KB |
random_03.txt | AC | 165 ms | 896 KB |
random_04.txt | WA | 161 ms | 896 KB |
random_05.txt | WA | 164 ms | 896 KB |
random_06.txt | AC | 162 ms | 896 KB |
random_07.txt | WA | 162 ms | 896 KB |
random_08.txt | AC | 161 ms | 896 KB |
random_09.txt | AC | 163 ms | 896 KB |
random_10.txt | WA | 162 ms | 896 KB |
sample_01.txt | AC | 1 ms | 256 KB |
sample_02.txt | WA | 1 ms | 256 KB |
small_01.txt | AC | 1 ms | 256 KB |
small_02.txt | AC | 1 ms | 256 KB |