# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
123351 | 2019-07-01T08:08:19 Z | 송준혁(#3022) | Two Dishes (JOI19_dishes) | C++14 | 7 ms | 860 KB |
#include <bits/stdc++.h> using namespace std; typedef long long LL; int N, M; LL A[2020], S[2020]; LL B[2020], T[2020]; int D[2020][2020]; int main(){ scanf("%d %d", &N, &M); for (int i=1; i<=N; i++){ scanf("%lld %lld %*d", &A[i], &S[i]); A[i] += A[i-1]; } for (int i=1; i<=M; i++){ scanf("%lld %lld %*d", &B[i], &T[i]); B[i] += B[i-1]; } for (int i=1; i<=N; i++) for (int j=1; j<=M; j++) D[i][j] = max(D[i-1][j] + ((A[i]+B[j] <= S[i]) ? 1 : 0), D[i][j-1] + ((A[i]+B[j] <= T[j]) ? 1 : 0)); printf("%d\n", D[N][M]); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 7 ms | 860 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 7 ms | 860 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 7 ms | 860 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |