답안 #1053207

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1053207 2024-08-11T09:44:36 Z MercubytheFirst 사탕 분배 (IOI21_candies) C++17
3 / 100
5000 ms 13276 KB
#include "candies.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

std::vector<signed> distribute_candies(std::vector<signed> c, std::vector<signed> l,
                                    std::vector<signed> r, std::vector<signed> v) {
    ll n = c.size(), Q = l.size();
    vector<signed> ans(n);
    for(ll i = 0; i < Q; ++i) {
        for(ll j = l[i]; j <= r[i]; ++j) {
            ans[j] += v[i];
            ans[j] = max(0, ans[j]);
            ans[j] = min(c[j], ans[j]);
        }
    }
    return ans;
}

/*

*/
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 5096 ms 7420 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 114 ms 5160 KB Output is correct
3 Correct 101 ms 5952 KB Output is correct
4 Execution timed out 5050 ms 13276 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 448 KB Output is correct
3 Correct 277 ms 4948 KB Output is correct
4 Correct 254 ms 3652 KB Output is correct
5 Execution timed out 5073 ms 10836 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Execution timed out 5096 ms 7420 KB Time limit exceeded
7 Halted 0 ms 0 KB -