답안 #434978

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
434978 2021-06-22T17:19:12 Z model_code 사탕 분배 (IOI21_candies) C++17
3 / 100
6000 ms 7256 KB
#include <bits/stdc++.h>

using namespace std;

vector<int> distribute_candies(vector<int> C, vector<int> L, vector<int> R, vector<int> V) {
    int n = C.size();
    vector<int> A(n);
    int q = L.size();
    for(int i = 0; i < q; ++i) {
        for(int j = L[i]; j <= R[i]; ++j) {
            A[j] += V[i];
            A[j] = max(A[j], 0); A[j] = min(A[j], C[j]);
        }
    }
    return A;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 4 ms 332 KB Output is correct
4 Correct 1 ms 332 KB Output is correct
5 Correct 3 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 6097 ms 7220 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 240 ms 4964 KB Output is correct
3 Correct 236 ms 3744 KB Output is correct
4 Execution timed out 6093 ms 7228 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 599 ms 4944 KB Output is correct
4 Correct 596 ms 2796 KB Output is correct
5 Execution timed out 6036 ms 7256 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 4 ms 332 KB Output is correct
4 Correct 1 ms 332 KB Output is correct
5 Correct 3 ms 332 KB Output is correct
6 Execution timed out 6097 ms 7220 KB Time limit exceeded
7 Halted 0 ms 0 KB -