Submission #72526

# Submission time Handle Problem Language Result Execution time Memory
72526 2018-08-26T08:49:06 Z 우리는 진실을 잊고 살잖아~~~(#2195, leejseo, king114) Nectar with Coconut Jelly (FXCUP3_nectar) C++17
15 / 100
22 ms 780 KB
#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 time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 484 KB Output is correct
3 Correct 2 ms 504 KB Output is correct
4 Correct 2 ms 504 KB Output is correct
5 Correct 2 ms 504 KB Output is correct
6 Correct 3 ms 576 KB Output is correct
7 Correct 14 ms 592 KB Output is correct
8 Correct 22 ms 696 KB Output is correct
9 Correct 22 ms 696 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 484 KB Output is correct
3 Correct 2 ms 504 KB Output is correct
4 Correct 2 ms 504 KB Output is correct
5 Correct 2 ms 504 KB Output is correct
6 Correct 3 ms 576 KB Output is correct
7 Correct 14 ms 592 KB Output is correct
8 Correct 22 ms 696 KB Output is correct
9 Correct 22 ms 696 KB Output is correct
10 Runtime error 3 ms 780 KB Execution killed with signal 11 (could be triggered by violating memory limits)
11 Halted 0 ms 0 KB -