| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1243931 | Quentolosse | 사탕 분배 (IOI21_candies) | C++20 | 5094 ms | 7240 KiB |
#include "candies.h"
#include <bits/stdc++.h>
using namespace std;
// #define int long long
vector<signed> distribute_candies(vector<signed> c, vector<signed> l, vector<signed> r, vector<signed> v) {
int n = c.size();
int q = l.size();
vector<int> bonbons(n, 0);
for (int i = 0; i < q; i++)
{
for (int j = l[i]; j <= r[i]; j++)
{
bonbons[j] += v[i];
bonbons[j] = min(bonbons[j], (int)c[j]);
bonbons[j] = max(bonbons[j], (int)0);
}
}
return bonbons;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
