제출 #144910

#제출 시각아이디문제언어결과실행 시간메모리
144910youssefbou62동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "cave.h" using namespace std; #define mp make_pair #define fi first #define se second #define all(v) v.begin(),v.end() #define allarr(a) a , a + n #define ll long long #define ull unsigned long long #define pb push_back #define fastio ios_base::sync_with_stdio(false) ; cin.tie(NULL); cout.tie(NULL) typedef pair<int, int> pi; typedef pair<ll,ll> pll; typedef pair<int,pi> trp ; typedef vector<pi> vpi; typedef vector<pll> vpll ; // int ab (int x ) { return (x>0?x:-x); } int n ,reply; int cnt = 0 ; int door[5005],Comb[5005]; int TryCombination(int S[]){ cnt++; return tryCombination(S); } void rev(int l , int r ){ for(int i = l ; i <= r ; i++ )if( door[i]==-1)Comb[i]=!Comb[i]; } void exploreCave(int N){ n = N ; memset(door,-1,sizeof door); memeset(Comb,0,sizeof Comb); for(int T = 0 ; T < N ; T++ ){ int FI = tryCombination(Comb); reply = FI ; if( reply == -1 )break ; int l = 0 , r =N-1 ; while ( l < r ){ int mid = (l+r)/2; rev(l,mid); reply = tryCombination(Comb); rev(l,mid); if( reply == FI )l = mid ; else r = mid ; } assert(reply == -1 || l == r ); if( l == r )door[l]=reply; } for(int i = 0 ; i < n ; i++ )if( door[i]==-1 ){ rev(i,i); reply = tryCombination(Comb); rev(i,i); door[i]=tryCombination(Comb); } answer(Comb); }

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:38:6: error: 'memeset' was not declared in this scope
      memeset(Comb,0,sizeof Comb); 
      ^~~~~~~
cave.cpp:38:6: note: suggested alternative: 'memset'
      memeset(Comb,0,sizeof Comb); 
      ^~~~~~~
      memset
cave.cpp:65:17: error: too few arguments to function 'void answer(int*, int*)'
      answer(Comb); 
                 ^
In file included from cave.cpp:2:0:
cave.h:9:6: note: declared here
 void answer(int S[], int D[]);
      ^~~~~~