답안 #1076109

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1076109 2024-08-26T11:11:42 Z Itamar 사탕 분배 (IOI21_candies) C++17
3 / 100
5000 ms 13396 KB
#include "candies.h"
#include<bits/stdc++.h>
#define vi vector<int>
using namespace std;
std::vector<int> distribute_candies(std::vector<int> c, std::vector<int> l,
                                    std::vector<int> r, std::vector<int> v) {
    int n = c.size();
    vi ans(n);
    int m = r.size();
    for(int j = 0; j < m; j++){
        for(int i = l[j]; i <= r[j]; i++){
            ans[i] = max(0,min(c[i],ans[i]+v[j]));
        }
    }
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 5056 ms 12116 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 129 ms 8020 KB Output is correct
3 Correct 142 ms 6300 KB Output is correct
4 Execution timed out 5053 ms 13396 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 348 KB Output is correct
3 Correct 337 ms 7796 KB Output is correct
4 Correct 385 ms 3932 KB Output is correct
5 Execution timed out 5095 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 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Execution timed out 5056 ms 12116 KB Time limit exceeded
7 Halted 0 ms 0 KB -