Submission #72409

#TimeUsernameProblemLanguageResultExecution timeMemory
72409IDxTree (#118)Nectar with Coconut Jelly (FXCUP3_nectar)C++17
15 / 100
42 ms740 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...