답안 #1058900

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1058900 2024-08-14T14:54:24 Z LittleOrange 사탕 분배 (IOI21_candies) C++17
3 / 100
5000 ms 13376 KB
#include "candies.h"

#include <vector>
#include<bits/stdc++.h>
using namespace std;
using ll = int;

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();
    ll q = l.size();
    vector<ll> out(n);
    for(ll i = 0;i<q;i++){
        for(ll j = l[i];j<=r[i];j++){
            out[j] += v[i];
            out[j] = max(min(out[j],c[j]),0);
        }
    }
    return out;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 440 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 448 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 3 ms 444 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 5090 ms 12136 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 114 ms 8020 KB Output is correct
3 Correct 109 ms 5956 KB Output is correct
4 Execution timed out 5036 ms 13376 KB Time limit exceeded
5 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 267 ms 7784 KB Output is correct
4 Correct 296 ms 4024 KB Output is correct
5 Execution timed out 5050 ms 10836 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 440 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 448 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 3 ms 444 KB Output is correct
6 Execution timed out 5090 ms 12136 KB Time limit exceeded
7 Halted 0 ms 0 KB -