제출 #339553

#제출 시각아이디문제언어결과실행 시간메모리
339553fixikmilaXoractive (IZhO19_xoractive)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 typedef long long ll; typedef pair<ll,ll>pll; typedef long double ld; ll bin_pow(ll a,ll b){ if(b==0)return 1; if(b%2==0){ ll t=bin_pow(a,b/2); return t*t%MOD; } else return a*bin_pow(a,b-1)%MOD; } int *guess(int n){ int a[4]; a[0]=ask(1); a[1]=ask(2); a[2]=ask(3); a[3]=ask(4); return a; }

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

Xoractive.cpp: In function 'int* guess(int)':
Xoractive.cpp:17:10: error: 'ask' was not declared in this scope
   17 |     a[0]=ask(1);
      |          ^~~
Xoractive.cpp:21:12: warning: address of local variable 'a' returned [-Wreturn-local-addr]
   21 |     return a;
      |            ^
Xoractive.cpp:16:9: note: declared here
   16 |     int a[4];
      |         ^