# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
767401 | sraeli | Archery (IOI09_archery) | C11 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
int encontrar_posicao_inicial(int N, int minhaClassificacao, int* competitorRanks) {
int melhorPosicao = 1;
for (int i = 0; i < 2 * N - 1; i += 2) {
if (competitorRanks[i] < minhaClassificacao) {
melhorPosicao++;
}
}
return melhorPosicao;
}
int main() {
int N, R;
scanf("%d %d", &N, &R) __attribute__((unused));
int minhaClassificacao;
scanf("%d", &minhaClassificacao) __attribute__((unused));
int competitorRanks[2 * N - 1];
for (int i = 0; i < 2 * N - 1; i++) {
scanf("%d", &competitorRanks[i]) __attribute__((unused));
}
int posicaoInicial = encontrar_posicao_inicial(N, minhaClassificacao, competitorRanks);
printf("%d\n", posicaoInicial);
return 0;
}