Submission #72201

# Submission time Handle Problem Language Result Execution time Memory
72201 2018-08-26T05:55:44 Z 신딩없는 신딩팀(#2212, willi19, andy627, maruii) Nectar with Coconut Jelly (FXCUP3_nectar) C++17
15 / 100
21 ms 636 KB
#include <stdio.h>
#include <algorithm>
using namespace std;

int cnt[1111];

int main(){
    int n,j,r,t;

    scanf("%d %d %d %d",&n,&j,&r,&t);

    for(int i=1;i<=n;i++) cnt[i]=j;
    while(t--){
        for(int i=n-1;i>=1;i--){
            cnt[i+1]+=(cnt[i]+r-1)/r;
            cnt[i]-=(cnt[i]+r-1)/r;
        }
    }

    for(int i=1;i<=n;i++) printf("%d\n",cnt[i]);

    return 0;
}

Compilation message

nectar.cpp: In function 'int main()':
nectar.cpp:10:10: 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 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 3 ms 428 KB Output is correct
4 Correct 4 ms 488 KB Output is correct
5 Correct 3 ms 572 KB Output is correct
6 Correct 3 ms 572 KB Output is correct
7 Correct 11 ms 588 KB Output is correct
8 Correct 18 ms 620 KB Output is correct
9 Correct 21 ms 620 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 3 ms 428 KB Output is correct
4 Correct 4 ms 488 KB Output is correct
5 Correct 3 ms 572 KB Output is correct
6 Correct 3 ms 572 KB Output is correct
7 Correct 11 ms 588 KB Output is correct
8 Correct 18 ms 620 KB Output is correct
9 Correct 21 ms 620 KB Output is correct
10 Runtime error 3 ms 636 KB Execution killed with signal 11 (could be triggered by violating memory limits)
11 Halted 0 ms 0 KB -