제출 #731758

#제출 시각아이디문제언어결과실행 시간메모리
731758AtabayRajabliRack (eJOI19_rack)C++11
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define pb push_back #define pii pair<int, int> #define pll pair<ll, ll> #define MAX 5e4 + 1 #define all(v) v.begin(), v.end() #define sz(v) v.size() #define INF 0x3F3F3F3F3F3F3F3FLL #define OPT ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define sec second #define fi first typedef long long ll; typedef unsigned long long ull; using namespace std; binpow(ll a, ll b, ll c) { } void $() { int n, k, mod = 1e9 + 7; cin >> n >> k; k--; int res = 0; while(k) { n--; if(k & 1) { res = (res + (int)pow(2, n)) % mod; } k >>= 1; } cout << res + 1 << endl; } int main() { OPT int t = 1; //cin >> t; while(t--) $(); }

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

rack.cpp:17:1: error: ISO C++ forbids declaration of 'binpow' with no type [-fpermissive]
   17 | binpow(ll a, ll b, ll c)
      | ^~~~~~
rack.cpp: In function 'int binpow(ll, ll, ll)':
rack.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^