제출 #726043

#제출 시각아이디문제언어결과실행 시간메모리
726043NemanjaSo2005비스킷 담기 (IOI20_biscuits)C++14
컴파일 에러
0 ms0 KiB
//#include <bits/stdc++.h>#define ll long longusing namespace std;const int MaxK=60;ll res,br,kol[MaxK*4],stepen[MaxK*4],del,K;ll count_tastiness(ll x,vector<ll> A){stepen[0]=1;for(int i=1;i<=MaxK;i++)stepen[i]=stepen[i-1]*2;for(int i=MaxK+1;i<MaxK*4;i++)stepen[i]=1;br=x;K=A.size();for(int i=0;i<K;i++)kol[i]=A[i];for(int i=K;i<4*MaxK;i++)kol[i]=0;res=1;ll br=0,maks=0;del=1;for(int i=0;i<4*MaxK;i++){if(br<x){res*=(maks/x+1);// cout<<i<<" "<<maks+1<<endl;br=0;maks=0;del=stepen[i];}br+=kol[i];maks+=#include <bits/stdc++.h>#define ll long longusing namespace std;const int MaxK=60;ll res,br,kol[MaxK*4],stepen[MaxK*4],del,K;ll count_tastiness(ll x,vector<ll> A){stepen[0]=1;for(int i=1;i<=MaxK;i++)stepen[i]=stepen[i-1]*2;for(int i=MaxK+1;i<MaxK*4;i++)stepen[i]=1;br=x;K=A.size();for(int i=0;i<K;i++)kol[i]=A[i];for(int i=K;i<4*MaxK;i++)kol[i]=0;res=1;ll br=0,maks=0;del=1;for(int i=0;i<4*MaxK;i++){if(br<x){res*=(maks/x+1);// cout<<i<<" "<<maks+1<<endl;br=0;maks=0;del=stepen[i];}br+=kol[i];maks+=kol[i]*stepen[i]/del;br/=2;}return res;}/#include <bits/stdc++.h>#define ll long longusing namespace std;const int MaxK=60;ll res,br,kol[MaxK*4],stepen[MaxK*4],del,K;ll count_tastiness(ll x,vector<ll> A){stepen[0]=1;for(int i=1;i<=MaxK;i++)stepen[i]=stepen[i-1]*2;for(int i=MaxK+1;i<MaxK*4;i++)stepen[i]=1;br=x;K=A.size();for(int i=0;i<K;i++)kol[i]=A[i];for(int i=K;i<4*MaxK;i++)kol[i]=0;res=1;ll br=0,maks=0;del=1;for(int i=0;i<4*MaxK;i++){if(br<x){res*=(maks/x+1);// cout<<i<<" "<<maks+1<<endl;br=0;maks=0;del=stepen[i];}br+=kol[i];maks+=kol[i]*stepen[i]/del;br/=2;}return res;}#include <bits/stdc++.h>#define ll long longusing namespace std;const int MaxK=60;ll res,br,kol[MaxK*4],stepen[MaxK*4],del,K;ll count_tastiness(ll x,vector<ll> A){stepen[0]=1;for(int i=1;i<=MaxK;i++)stepen[i]=stepen[i-1]*2;for(int i=MaxK+1;i<MaxK*4;i++)stepen[i]=1;br=x;K=A.size();for(int i=0;i<K;i++)kol[i]=A[i];for(int i=K;i<4*MaxK;i++)kol[i]=0;res=1;ll br=0,maks=0;del=1;for(int i=0;i<4*MaxK;i++){if(br<x){res*=(maks/x+1);// cout<<i<<" "<<maks+1<<endl;br=0;maks=0;del=stepen[i];}br+=kol[i];maks+=kol[i]*stepen[i]/del;br/=2;}return res;}#include <bits/stdc++.h>#define ll long longusing namespace std;const int MaxK=60;ll res,br,kol[MaxK*4],stepen[MaxK*4],del,K;ll count_tastiness(ll x,vector<ll> A){stepen[0]=1;for(int i=1;i<=MaxK;i++)stepen[i]=stepen[i-1]*2;for(int i=MaxK+1;i<MaxK*4;i++)stepen[i]=1;br=x;K=A.size();for(int i=0;i<K;i++)kol[i]=A[i];for(int i=K;i<4*MaxK;i++)kol[i]=0;res=1;ll br=0,maks=0;del=1;for(int i=0;i<4*MaxK;i++){if(br<x){res*=(maks/x+1);// cout<<i<<" "<<maks+1<<endl;br=0;maks=0;del=stepen[i];}br+=kol[i];maks+=kol[i]*stepen[i]/del;br/=2;}return res;}

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

/usr/bin/ld: /tmp/cc0VmTCr.o: in function `main':
grader.cpp:(.text.startup+0x487): undefined reference to `count_tastiness(long long, std::vector<long long, std::allocator<long long> >)'
collect2: error: ld returned 1 exit status