답안 #767342

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
767342 2023-06-26T16:19:16 Z sraeli Archery (IOI09_archery) C
0 / 100
29 ms 1844 KB
#include <stdio.h>

int main() {
    int N, R;
    scanf("%d %d", &N, &R);
    
    int archers[400000]; // Vetor para armazenar as classificações dos arqueiros
    
    // Leitura das classificações dos arqueiros
    for (int i = 0; i < 2 * N - 1; i++) {
        scanf("%d", &archers[i]);
    }
    
    int start_target = N; // Alvo onde o jogador deve começar
    
    // Verificação do alvo de início
    for (int i = 0; i < 2 * N - 1; i++) {
        if (archers[i] < archers[2 * N - 2]) {
            // Se a classificação do jogador for menor que a do último arqueiro na fila, ele deve começar em um alvo posterior
            start_target = (i % N) + 1;
            break;
        }
    }
    
    printf("%d\n", start_target);
    
    return 0;
}

Compilation message

archery.c: In function 'main':
archery.c:5:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    5 |     scanf("%d %d", &N, &R);
      |     ^~~~~~~~~~~~~~~~~~~~~~
archery.c:11:9: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |         scanf("%d", &archers[i]);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 1748 KB Output isn't correct
2 Incorrect 1 ms 1748 KB Output isn't correct
3 Incorrect 1 ms 1748 KB Output isn't correct
4 Incorrect 1 ms 1748 KB Output isn't correct
5 Incorrect 1 ms 1820 KB Output isn't correct
6 Incorrect 1 ms 1748 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 1748 KB Output isn't correct
2 Incorrect 1 ms 1748 KB Output isn't correct
3 Incorrect 1 ms 1748 KB Output isn't correct
4 Incorrect 3 ms 1748 KB Output isn't correct
5 Incorrect 25 ms 1748 KB Output isn't correct
6 Incorrect 2 ms 1748 KB Output isn't correct
7 Incorrect 1 ms 1748 KB Output isn't correct
8 Incorrect 3 ms 1748 KB Output isn't correct
9 Incorrect 4 ms 1748 KB Output isn't correct
10 Incorrect 1 ms 1748 KB Output isn't correct
11 Incorrect 4 ms 1748 KB Output isn't correct
12 Incorrect 2 ms 1748 KB Output isn't correct
13 Incorrect 18 ms 1844 KB Output isn't correct
14 Incorrect 2 ms 1748 KB Output isn't correct
15 Incorrect 5 ms 1748 KB Output isn't correct
16 Incorrect 1 ms 1748 KB Output isn't correct
17 Incorrect 1 ms 1748 KB Output isn't correct
18 Incorrect 1 ms 1748 KB Output isn't correct
19 Incorrect 1 ms 1748 KB Output isn't correct
20 Incorrect 2 ms 1748 KB Output isn't correct
21 Incorrect 4 ms 1840 KB Output isn't correct
22 Incorrect 5 ms 1748 KB Output isn't correct
23 Incorrect 26 ms 1748 KB Output isn't correct
24 Incorrect 1 ms 1748 KB Output isn't correct
25 Incorrect 1 ms 1748 KB Output isn't correct
26 Incorrect 2 ms 1748 KB Output isn't correct
27 Incorrect 4 ms 1748 KB Output isn't correct
28 Incorrect 19 ms 1844 KB Output isn't correct
29 Incorrect 1 ms 1748 KB Output isn't correct
30 Incorrect 1 ms 1748 KB Output isn't correct
31 Incorrect 4 ms 1748 KB Output isn't correct
32 Incorrect 25 ms 1844 KB Output isn't correct
33 Incorrect 1 ms 1748 KB Output isn't correct
34 Incorrect 1 ms 1748 KB Output isn't correct
35 Incorrect 1 ms 1748 KB Output isn't correct
36 Incorrect 1 ms 1748 KB Output isn't correct
37 Incorrect 3 ms 1748 KB Output isn't correct
38 Incorrect 4 ms 1748 KB Output isn't correct
39 Incorrect 1 ms 1748 KB Output isn't correct
40 Incorrect 1 ms 1748 KB Output isn't correct
41 Incorrect 1 ms 1748 KB Output isn't correct
42 Incorrect 1 ms 1748 KB Output isn't correct
43 Incorrect 2 ms 1748 KB Output isn't correct
44 Incorrect 2 ms 1748 KB Output isn't correct
45 Incorrect 4 ms 1748 KB Output isn't correct
46 Incorrect 5 ms 1748 KB Output isn't correct
47 Incorrect 29 ms 1748 KB Output isn't correct