제출 #425198

#제출 시각아이디문제언어결과실행 시간메모리
425198SAAD동굴 (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
#define F first #define S second #define rep(i,a,b) for(int i=a;!(a==b&&i!=b)&&((i<=b&&b>=a)||(i>=b&&a>=b));i+=(a<=b?1:-1)) #define pb push_back #define Fbitl __builtin_ffs #define bit1 __builtin_popcount //#include <bits/stdc++.h> #include <iostream> #include <math.h> #include <algorithm> #include <string.h> #include <vector> #include <queue> #include <map> #include <unordered_map> #include "cave.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<ll> vl; typedef vector<vl> vvl; void exploreCave(int N) { int com[N] , ans2[N] ; for(int i=0;i<N;i++) { com[i] = 0; } for ( int i = 0 ; i < N ; i++ ) { com[i] = 1 ; ans2[i] = tryCombination(com[i]); com[i] = 0 ; } answer(com,ans2); }

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:34:39: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   34 |         ans2[i] = tryCombination(com[i]);
      |                                  ~~~~~^
      |                                       |
      |                                       int
cave.cpp:2:11: note:   initializing argument 1 of 'int tryCombination(int*)'
    2 | #define S second
cave.h:8:24: note: in expansion of macro 'S'
    8 | int tryCombination(int S[]);
      |                        ^