# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
436189 | 2021-06-24T10:08:52 Z | Bom164 | 사탕 분배 (IOI21_candies) | C++17 | 5000 ms | 7216 KB |
#include<bits/stdc++.h> #include<iostream> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define pii pair<int,int> #define vi vector<int> #define mii map<int,int> #define pqb priority_queue<int> #define pqs priority_queue<int,vi,greater<int> > #define mod 1000000007 #define inf 1e18 #define w(x) int x; cin>>x; while(x--) vector<int> distribute_candies(vector<int> c,vector<int> l,vector<int> r,vector<int> v){ int n=c.size(); int q=l.size(); vector<int> s(n,0); for(int i=0;i<q;i++){ int left=l[i]; int right=r[i]; for(int j=left;j<=right;j++){ s[i] = max(s[i] + v[j], 0); s[i] = min(s[i], c[i]); } } s=c; for(int i=0;i<n;i++){ cout<<s[i]<<" "; } cout<<endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 332 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 5060 ms | 7216 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 332 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 332 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 332 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |