제출 #1291573

#제출 시각아이디문제언어결과실행 시간메모리
1291573hssaan_arif동굴 (IOI13_cave)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "cave.h" using namespace std; #define endl "\n" #define pb push_back #define int long long #define fi first #define se second const int N = 3e5 + 5, M = 1e9 + 7, LG = 20; int n , A[N] , y , k; void exploreCave(int N) { int S[N] = {} , D[N] = {}; for (int i=0 ; i<n ; i++){ int u = tryCombination(S); if (u == -1 || u >= i){ continue; }else{ S[i] = 1; } } answer(S , D); }

컴파일 시 표준 에러 (stderr) 메시지

cave.cpp: In function 'void exploreCave(long long int)':
cave.cpp:20:32: error: cannot convert 'long long int*' to 'int*'
   20 |         int u = tryCombination(S);
      |                                ^
      |                                |
      |                                long long int*
In file included from cave.cpp:2:
cave.h:8:24: note:   initializing argument 1 of 'int tryCombination(int*)'
    8 | int tryCombination(int S[]);
      |                    ~~~~^~~
cave.cpp:27:12: error: cannot convert 'long long int*' to 'int*'
   27 |     answer(S , D);
      |            ^
      |            |
      |            long long int*
cave.h:9:17: note:   initializing argument 1 of 'void answer(int*, int*)'
    9 | void answer(int S[], int D[]);
      |             ~~~~^~~