| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 677874 | APROHACK | 사탕 분배 (IOI21_candies) | C++17 | 5050 ms | 13556 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "candies.h"
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ff first
#define ss second
using namespace std;
int n, q;
vector<int>s;
std::vector<int> distribute_candies(std::vector<int> c, std::vector<int> l,
std::vector<int> r, std::vector<int> v) {
n = c.size();
q = l.size();
for (int i = 0; i < n; i++)
{
s.pb(0);
}
for(int i = 0 ; i < q ; i ++){
for(int j = l[i] ; j <= r[i] ; j ++){
if(v[i] > 0){
s[j] = min(c[j], v[i]+s[j]);
//cout << "s[" << j << "] = " << s[j] << endl;
}else{
s[j] = max(0, s[j]+v[i] );
// << "s[" << j << "] = " << s[j] << endl;
}
}
}
return s;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
