제출 #720592

#제출 시각아이디문제언어결과실행 시간메모리
720592bin9638비스킷 담기 (IOI20_biscuits)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #ifndef SKY #include "biscuits.h" #endif // SKY using namespace std; #define N 110 #define ll long long #define fs first #define sc second #define ii pair<int,int> #define pb push_back const int num_bit=60; int n; vector<ll>a; unordered_mapp<ll,ll>mp[N][N]; ll m; ll get(ll sl,int pos,int cnt) { if(cnt>=17) return 1; if(pos==num_bit) return 1; if(mp[pos][cnt].find(sl)!=mp[pos][cnt].end()) return mp[pos][cnt][sl]; ll res=get((sl+a[pos])/2,pos+1,cnt); if(sl+a[pos]>=m) res+=get((sl+a[pos]-m)/2,pos+1,cnt+1); return(mp[pos][cnt][sl]=res); } ll count_tastiness(ll cc, vector<ll> vec) { n=vec.size(); a=vec; m=cc; while(n<60) a.pb(0),n++; for(int i=0;i<=num_bit;i++) for(int j=0;j<=num_bit+1;j++) mp[i][j].clear(); return get(0,0,0); } #ifdef SKY int main() { freopen("A.inp","r",stdin); freopen("A.out","w",stdout); ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); ll x,k; cin>>x>>k; vector<ll>a(k); for(int i=0;i<k;i++) cin>>a[i]; cout<<count_tastiness(x,a); return 0; } #endif

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

biscuits.cpp:20:1: error: 'unordered_mapp' does not name a type
   20 | unordered_mapp<ll,ll>mp[N][N];
      | ^~~~~~~~~~~~~~
biscuits.cpp: In function 'long long int get(long long int, int, int)':
biscuits.cpp:29:8: error: 'mp' was not declared in this scope; did you mean 'm'?
   29 |     if(mp[pos][cnt].find(sl)!=mp[pos][cnt].end())
      |        ^~
      |        m
biscuits.cpp:34:12: error: 'mp' was not declared in this scope; did you mean 'm'?
   34 |     return(mp[pos][cnt][sl]=res);
      |            ^~
      |            m
biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:46:13: error: 'mp' was not declared in this scope; did you mean 'm'?
   46 |             mp[i][j].clear();
      |             ^~
      |             m