Submission #1112397

#TimeUsernameProblemLanguageResultExecution timeMemory
1112397vjudge1Baloni (COCI15_baloni)C11
0 / 100
63 ms3888 KiB
#include <stdio.h> int main(){ int N; scanf("%d", &N); int b[N]; for (int i = 0; i < N; i++){ scanf("%d", &b[i]);} int out = 0; int target = -1; for (int i = 0; i < N; i++){ if (b[i] > target){ out++; target = b[i];} }printf("%d\n", out); return 0;}

Compilation message (stderr)

baloni.c: In function 'main':
baloni.c:4:1: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    4 | scanf("%d", &N);
      | ^~~~~~~~~~~~~~~
baloni.c:7:1: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 | scanf("%d", &b[i]);}
      | ^~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...