# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
767384 | sraeli | Archery (IOI09_archery) | C11 | 329 ms | 1848 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 main() {
int N, R;
scanf("%d %d", &N, &R);
int myRank, competitorRanks[400000];
scanf("%d", &myRank);
for (int i = 0; i < 2 * N - 1; i++) {
scanf("%d", &competitorRanks[i]);
}
int target = 1; // Alvo inicial (alvo 1)
int round = 1;
while (round < R) {
if (target == 1) {
if (myRank < competitorRanks[0]) {
target = N; // O perdedor do alvo 1 se move para o alvo N
}
} else {
if (myRank < competitorRanks[(target - 2) * 2]) {
target--; // Os vencedores se movem para a esquerda
}
}
round++;
}
printf("%d\n", target);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |