Submission #67625

# Submission time Handle Problem Language Result Execution time Memory
67625 2018-08-15T06:52:36 Z 검수컵(#1978, imsifile) Nectar with Coconut Jelly (FXCUP3_nectar) C++
15 / 100
2000 ms 544 KB
#include<stdio.h>

int N, J, R, T, ba[101010];

int ce(int x){ return (x+R-1)/R; }

int main(){
	scanf("%d%d%d%d", &N, &J, &R, &T);
	for(int i=0; i<N; i++) ba[i]=J;
	for(int t=0; t<T; t++){
		for(int i=1; i<N; i++) ba[i-1]+=ce(ba[i]), ba[i]-=ce(ba[i]);
	}
	for(int i=N-1; i>=0; i--) printf("%d\n", ba[i]);
	return 0;
}

Compilation message

nectar.cpp: In function 'int main()':
nectar.cpp:8:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d%d%d", &N, &J, &R, &T);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 3 ms 360 KB Output is correct
3 Correct 3 ms 360 KB Output is correct
4 Correct 3 ms 436 KB Output is correct
5 Correct 2 ms 492 KB Output is correct
6 Correct 3 ms 492 KB Output is correct
7 Correct 13 ms 536 KB Output is correct
8 Correct 20 ms 536 KB Output is correct
9 Correct 19 ms 544 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 3 ms 360 KB Output is correct
3 Correct 3 ms 360 KB Output is correct
4 Correct 3 ms 436 KB Output is correct
5 Correct 2 ms 492 KB Output is correct
6 Correct 3 ms 492 KB Output is correct
7 Correct 13 ms 536 KB Output is correct
8 Correct 20 ms 536 KB Output is correct
9 Correct 19 ms 544 KB Output is correct
10 Execution timed out 2029 ms 544 KB Time limit exceeded
11 Halted 0 ms 0 KB -