제출 #631235

#제출 시각아이디문제언어결과실행 시간메모리
631235smartmonkyRack (eJOI19_rack)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define ll long long #define pb push_back #define int ll using namespace std; const int mod=1e9+7; main(){ int n,k; cin >>n >>k; map<int,int> v,ans; v[1]=1; ans[1]=1; v[2]=(x/2+1)%mod; ans[2]=(v[2])%mod; int cnt=2; int s=3; for(int i=x/4;i>=1;i/=2){ for(int j=1;j<=cnt;j++){ v[cnt+j]=(v[j]+i)%mod; ans[s]=v[cnt+j]; s++; } cnt*=2; } cout<<ans[k]; }

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

rack.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~
rack.cpp: In function 'int main()':
rack.cpp:13:8: error: 'x' was not declared in this scope
   13 |  v[2]=(x/2+1)%mod;
      |        ^