답안 #836515

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
836515 2023-08-24T12:11:12 Z FulopMate 사탕 분배 (IOI21_candies) C++17
3 / 100
5000 ms 13232 KB
#include "candies.h"

#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> s(n);

    int q = l.size();

    for(int i = 0; i < q; i++){
        for(int j = l[i]; j <= r[i]; j++){
            s[j]+=v[i];
            s[j] = max(0, min(c[j], s[j]));
        }
    }

    return s;
}
# 결과 실행 시간 메모리 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 2 ms 340 KB Output is correct
5 Correct 3 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 5082 ms 12116 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 192 ms 8028 KB Output is correct
3 Correct 171 ms 6016 KB Output is correct
4 Execution timed out 5075 ms 13232 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 479 ms 7656 KB Output is correct
4 Correct 509 ms 4008 KB Output is correct
5 Execution timed out 5097 ms 10844 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 2 ms 340 KB Output is correct
5 Correct 3 ms 340 KB Output is correct
6 Execution timed out 5082 ms 12116 KB Time limit exceeded
7 Halted 0 ms 0 KB -