제출 #1312503

#제출 시각아이디문제언어결과실행 시간메모리
1312503MunkhturErdenebat축제 (IOI25_festival)C++20
컴파일 에러
0 ms0 KiB
#include "festival.h" #include<bits/stdc++.h> #include<string.h> #include <algorithm> #include <iterator> #include <set> #include <stdlib.h> #define ll long long #define fr first #define sc second #define pb push_back #define YES cout<<"YES"<<endl #define NO cout<<"NO"<<endl using namespace std; ll a,b,c,d,e,f,m,i,j,n,h,g,r,ka,q[351105],maa[200005]; map<ll,ll> mee,see; map<ll,ll> mii; vector<ll> vas,vis,vii; string x,y,z,te,to; vector<pair<ll,ll>> ves[50]; pair<ll,ll> wefe; priority_queue<ll> pq1,pq2; stack<ll> munkh; ll l[5]; void check(ll b){ ll c=0; for(j=4 ; j>=0 ; j--){ if(c>0){ check(b); break; } for(ll i=l[j] ; i<ves[j].size() ; i++){ if((b-ves[j][i].fr)*j>=b){ c++; vas.pb(ves[j][i].sc); l[j]++; } else{ break; } } } if(c==0){ return ; } } vector<ll> max_coupons(ll b, vector<ll> k, vector<ll> t) { a=k.size(); for(i=0 ; i<a ; i++){ ves[t[i]].pb({k[i],i+1}); } for(i=0 ; i<=4 ; i++){ sort(ves[i].begin(),ves[i].end()); } l[1]=0; l[2]=0; l[3]=0; l[4]=0; l[0]=0; check(b); return vas; }

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

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