# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
838754 | 2023-08-27T17:12:08 Z | ErJ | 사탕 분배 (IOI21_candies) | C++17 | 5000 ms | 10220 KB |
#include <vector> #include <cmath> #include <algorithm> #include <iostream> using namespace std; typedef long long ll; vector<int> distribute_candies(vector<int> c, vector<int> l, vector<int> r, vector<int> v) { vector<int> ans(c.size()); for (int i = 0; i < l.size(); i++) { for (int j = l[i]; j <= r[i]; j++) { if (v[i] > 0) { ans[j] = min(c[j], ans[j] + v[i]); } else { ans[j] = max(0, ans[j] + v[i]); } } } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 340 KB | Output is correct |
5 | Correct | 2 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 5036 ms | 7244 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 146 ms | 7792 KB | Output is correct |
3 | Correct | 142 ms | 5920 KB | Output is correct |
4 | Execution timed out | 5073 ms | 10220 KB | Time limit exceeded |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 354 ms | 7656 KB | Output is correct |
4 | Correct | 342 ms | 4012 KB | Output is correct |
5 | Execution timed out | 5023 ms | 10188 KB | Time limit exceeded |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 340 KB | Output is correct |
5 | Correct | 2 ms | 340 KB | Output is correct |
6 | Execution timed out | 5036 ms | 7244 KB | Time limit exceeded |
7 | Halted | 0 ms | 0 KB | - |