# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72324 | (#118) | Nectar with Coconut Jelly (FXCUP3_nectar) | C++17 | 2060 ms | 580 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<cstdio>
#include<algorithm>
using namespace std;
int N,J,R,T;
int ans[100000];
int pending[100000];
int main(){
scanf("%d%d%d%d",&N,&J,&R,&T);
for(int i=0;i<N;i++) ans[i] = J;
for(int iter=0;iter<T;iter++){
for(int i=1;i<N;i++){
pending[i] = ans[i]/R;
if(ans[i]%R) pending[i]++;
}
for(int i=1;i<N;i++){
ans[i-1] += pending[i];
ans[i] -= pending[i];
}
}
for(int i=N-1;i>=0;i--) printf("%d\n", ans[i]);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |