Submission #72526

#TimeUsernameProblemLanguageResultExecution timeMemory
72526우리는 진실을 잊고 살잖아~~~ (#118)Nectar with Coconut Jelly (FXCUP3_nectar)C++17
15 / 100
22 ms780 KiB
#include <bits/stdc++.h> using namespace std; int A[1000], B[1000], N, J, R, T; int ceil(int x, int y){ return (x/y) + (x%y == 0 ? 0 : 1); } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cin >> N >> J >> R >> T; for (int i=0; i<N; i++){ A[i] = J; } for (int t=0; t<T; t++){ for (int i=0; i<N; i++) B[i] = 0; for (int i=0; i<N-1; i++){ int num = ceil(A[i], R); B[i] -= num; B[i+1] += num; } for (int i=0; i<N; i++) A[i] += B[i]; } for (int i=0; i<N; i++) cout << A[i] << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...