# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1041515 | 2024-08-02T05:03:27 Z | 김은성(#11000) | Bring Down the Grading Server (CEOI23_gradingserver) | C++17 | 365 ms | 196452 KB |
#include <bits/stdc++.h> using namespace std; bool dp[109][109][109][109]; int main(){ int s, q, ch, fh, cg, fg, i; scanf("%d %d", &s, &q); for(i=0; i<=300; i++){ for(ch=0; ch<=75; ch++){ for(fh=0; fh<=75; fh++){ for(cg=0; cg<=75; cg++){ fg = i-ch-fh-cg; if(0 <= fg && fg <= 75){ if(ch == 0) dp[ch][fh][cg][fg] = 0; else if(cg == 0) dp[ch][fh][cg][fg] = 1; else{ dp[ch][fh][cg][fg] = 0; if(fg > 0 && !dp[cg][max(fg-1, 0)][ch][fh]) dp[ch][fh][cg][fg] = 1; if(ch-fg*s > 0 && !dp[max(cg-max(ch-fg*s, 0), 0)][fg][ch][fh]) dp[ch][fh][cg][fg] = 1; } } } } } } while(q--){ scanf("%d %d %d %d", &ch, &fh, &cg, &fg); printf("%s\n", dp[ch][fh][cg][fg] ? "YES" : "NO"); } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 313 ms | 97044 KB | Output is correct |
2 | Runtime error | 365 ms | 196372 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 234 ms | 97052 KB | Output is correct |
2 | Correct | 311 ms | 100688 KB | Output is correct |
3 | Correct | 297 ms | 100688 KB | Output is correct |
4 | Correct | 279 ms | 100828 KB | Output is correct |
5 | Correct | 288 ms | 100692 KB | Output is correct |
6 | Correct | 315 ms | 100436 KB | Output is correct |
7 | Correct | 326 ms | 100556 KB | Output is correct |
8 | Correct | 302 ms | 100644 KB | Output is correct |
9 | Correct | 309 ms | 100552 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 234 ms | 97052 KB | Output is correct |
2 | Correct | 311 ms | 100688 KB | Output is correct |
3 | Correct | 297 ms | 100688 KB | Output is correct |
4 | Correct | 279 ms | 100828 KB | Output is correct |
5 | Correct | 288 ms | 100692 KB | Output is correct |
6 | Correct | 315 ms | 100436 KB | Output is correct |
7 | Correct | 326 ms | 100556 KB | Output is correct |
8 | Correct | 302 ms | 100644 KB | Output is correct |
9 | Correct | 309 ms | 100552 KB | Output is correct |
10 | Correct | 283 ms | 96912 KB | Output is correct |
11 | Correct | 330 ms | 100688 KB | Output is correct |
12 | Correct | 303 ms | 100436 KB | Output is correct |
13 | Correct | 283 ms | 100644 KB | Output is correct |
14 | Correct | 280 ms | 100688 KB | Output is correct |
15 | Correct | 305 ms | 100688 KB | Output is correct |
16 | Correct | 316 ms | 100600 KB | Output is correct |
17 | Correct | 296 ms | 100644 KB | Output is correct |
18 | Correct | 318 ms | 100536 KB | Output is correct |
19 | Runtime error | 332 ms | 196452 KB | Execution killed with signal 11 |
20 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 334 ms | 196436 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 234 ms | 97052 KB | Output is correct |
2 | Correct | 311 ms | 100688 KB | Output is correct |
3 | Correct | 297 ms | 100688 KB | Output is correct |
4 | Correct | 279 ms | 100828 KB | Output is correct |
5 | Correct | 288 ms | 100692 KB | Output is correct |
6 | Correct | 315 ms | 100436 KB | Output is correct |
7 | Correct | 326 ms | 100556 KB | Output is correct |
8 | Correct | 302 ms | 100644 KB | Output is correct |
9 | Correct | 309 ms | 100552 KB | Output is correct |
10 | Correct | 283 ms | 96912 KB | Output is correct |
11 | Correct | 330 ms | 100688 KB | Output is correct |
12 | Correct | 303 ms | 100436 KB | Output is correct |
13 | Correct | 283 ms | 100644 KB | Output is correct |
14 | Correct | 280 ms | 100688 KB | Output is correct |
15 | Correct | 305 ms | 100688 KB | Output is correct |
16 | Correct | 316 ms | 100600 KB | Output is correct |
17 | Correct | 296 ms | 100644 KB | Output is correct |
18 | Correct | 318 ms | 100536 KB | Output is correct |
19 | Runtime error | 332 ms | 196452 KB | Execution killed with signal 11 |
20 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 234 ms | 97052 KB | Output is correct |
2 | Correct | 311 ms | 100688 KB | Output is correct |
3 | Correct | 297 ms | 100688 KB | Output is correct |
4 | Correct | 279 ms | 100828 KB | Output is correct |
5 | Correct | 288 ms | 100692 KB | Output is correct |
6 | Correct | 315 ms | 100436 KB | Output is correct |
7 | Correct | 326 ms | 100556 KB | Output is correct |
8 | Correct | 302 ms | 100644 KB | Output is correct |
9 | Correct | 309 ms | 100552 KB | Output is correct |
10 | Correct | 283 ms | 96912 KB | Output is correct |
11 | Correct | 330 ms | 100688 KB | Output is correct |
12 | Correct | 303 ms | 100436 KB | Output is correct |
13 | Correct | 283 ms | 100644 KB | Output is correct |
14 | Correct | 280 ms | 100688 KB | Output is correct |
15 | Correct | 305 ms | 100688 KB | Output is correct |
16 | Correct | 316 ms | 100600 KB | Output is correct |
17 | Correct | 296 ms | 100644 KB | Output is correct |
18 | Correct | 318 ms | 100536 KB | Output is correct |
19 | Runtime error | 332 ms | 196452 KB | Execution killed with signal 11 |
20 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 234 ms | 97052 KB | Output is correct |
2 | Correct | 311 ms | 100688 KB | Output is correct |
3 | Correct | 297 ms | 100688 KB | Output is correct |
4 | Correct | 279 ms | 100828 KB | Output is correct |
5 | Correct | 288 ms | 100692 KB | Output is correct |
6 | Correct | 315 ms | 100436 KB | Output is correct |
7 | Correct | 326 ms | 100556 KB | Output is correct |
8 | Correct | 302 ms | 100644 KB | Output is correct |
9 | Correct | 309 ms | 100552 KB | Output is correct |
10 | Correct | 252 ms | 96848 KB | Output is correct |
11 | Correct | 313 ms | 97816 KB | Output is correct |
12 | Correct | 339 ms | 97872 KB | Output is correct |
13 | Correct | 296 ms | 97744 KB | Output is correct |
14 | Correct | 285 ms | 97756 KB | Output is correct |
15 | Correct | 294 ms | 97712 KB | Output is correct |
16 | Correct | 308 ms | 97876 KB | Output is correct |
17 | Correct | 307 ms | 97872 KB | Output is correct |
18 | Correct | 322 ms | 97776 KB | Output is correct |
19 | Runtime error | 292 ms | 196436 KB | Execution killed with signal 11 |
20 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 234 ms | 97052 KB | Output is correct |
2 | Correct | 311 ms | 100688 KB | Output is correct |
3 | Correct | 297 ms | 100688 KB | Output is correct |
4 | Correct | 279 ms | 100828 KB | Output is correct |
5 | Correct | 288 ms | 100692 KB | Output is correct |
6 | Correct | 315 ms | 100436 KB | Output is correct |
7 | Correct | 326 ms | 100556 KB | Output is correct |
8 | Correct | 302 ms | 100644 KB | Output is correct |
9 | Correct | 309 ms | 100552 KB | Output is correct |
10 | Correct | 283 ms | 96912 KB | Output is correct |
11 | Correct | 330 ms | 100688 KB | Output is correct |
12 | Correct | 303 ms | 100436 KB | Output is correct |
13 | Correct | 283 ms | 100644 KB | Output is correct |
14 | Correct | 280 ms | 100688 KB | Output is correct |
15 | Correct | 305 ms | 100688 KB | Output is correct |
16 | Correct | 316 ms | 100600 KB | Output is correct |
17 | Correct | 296 ms | 100644 KB | Output is correct |
18 | Correct | 318 ms | 100536 KB | Output is correct |
19 | Runtime error | 332 ms | 196452 KB | Execution killed with signal 11 |
20 | Halted | 0 ms | 0 KB | - |