이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
const int inf=2e9;
int n, j, r, t;
ll A[1010];
int main(){
ios::sync_with_stdio(0); cin.tie(0);
cin>>n>>j>>r>>t;
assert(n<=1000 && t<=3000);
for(int i=1; i<=n; i++) A[i]=j;
for(int _=1; _<=t; _++){
for(int i=n-1; i>=1; i--){
int x=(A[i]+r-1)/r;
A[i+1]+=x, A[i]-=x;
}
}
for(int i=1; i<=n; i++) cout<<A[i]<<'\n';
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |