# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
888633 | 2023-12-18T04:40:27 Z | irmuun | 사탕 분배 (IOI21_candies) | C++17 | 5000 ms | 13368 KB |
#include<bits/stdc++.h> #include "candies.h" using namespace std; #define ll long long #define pb push_back #define ff first #define ss second #define all(s) s.begin(),s.end() #define rall(s) s.rbegin(),s.rend() vector<int>distribute_candies(vector<int>c,vector<int>l,vector<int>r,vector<int>v){ vector<int>ans(c.size(),0); for(int i=0;i<l.size();i++){ for(int j=l[i];j<=r[i];j++){ if(v[i]>0){ ans[j]=min(c[j],ans[j]+v[i]); } else{ ans[j]=max(0,ans[j]+v[i]); } } } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 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 | 344 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 5076 ms | 7416 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 161 ms | 8156 KB | Output is correct |
3 | Correct | 138 ms | 5956 KB | Output is correct |
4 | Execution timed out | 5064 ms | 13368 KB | Time limit exceeded |
5 | 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 | 381 ms | 8024 KB | Output is correct |
4 | Correct | 347 ms | 3932 KB | Output is correct |
5 | Execution timed out | 5099 ms | 10832 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 | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 2 ms | 344 KB | Output is correct |
6 | Execution timed out | 5076 ms | 7416 KB | Time limit exceeded |
7 | Halted | 0 ms | 0 KB | - |