Submission #767396

#TimeUsernameProblemLanguageResultExecution timeMemory
767396sraeliArchery (IOI09_archery)C11
0 / 100
29 ms1820 KiB
#include <stdio.h> int encontrar_posicao_inicial(int N, int minhaClassificacao, int* competitorRanks) { int melhorPosicao = 1; for (int i = 0; i < N - 1; i++) { if (competitorRanks[i] < minhaClassificacao) { melhorPosicao++; } } return melhorPosicao; } int main() { int N, R; scanf("%d %d", &N, &R); int minhaClassificacao; scanf("%d", &minhaClassificacao); int competitorRanks[2 * N - 2]; for (int i = 0; i < 2 * N - 2; i++) { scanf("%d", &competitorRanks[i]); } int posicaoInicial = encontrar_posicao_inicial(N, minhaClassificacao, competitorRanks); printf("%d\n", posicaoInicial); return 0; }

Compilation message (stderr)

archery.c: In function 'main':
archery.c:17:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   17 |     scanf("%d %d", &N, &R);
      |     ^~~~~~~~~~~~~~~~~~~~~~
archery.c:20:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |     scanf("%d", &minhaClassificacao);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
archery.c:24:9: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   24 |         scanf("%d", &competitorRanks[i]);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...