제출 #301056

#제출 시각아이디문제언어결과실행 시간메모리
301056Nucleist카니발 티켓 (IOI20_tickets)C++14
컴파일 에러
0 ms0 KiB
#include "tickets.h" #include <bits/stdc++.h> #define sz(x) x.size() #define ll long long #define ve vector<ll> #define pb push_back #define all(x) x.begin(),x.end() using namespace std; long long find_maximum(ll k,vector<vector<ll>> x) { ll n=sz(x); ve cur; for (ll i = 0; i < n; ++i) { cur.pb(x[i][0]); } sort(all(cur)); ll in=cur[n/2]; ll ans=0; for(auto it:cur){ ans+=abs(it-in); } vector<ve>ani; ani.resize(n); for (ll i = 0; i < n; ++i) { ani[i].pb(0); } allocate_tickets(ani); return ans; }

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

tickets.cpp: In function 'long long int find_maximum(long long int, std::vector<std::vector<long long int> >)':
tickets.cpp:28:19: error: could not convert 'ani' from 'vector<vector<long long int>>' to 'vector<vector<int>>'
   28 |  allocate_tickets(ani);
      |                   ^~~
      |                   |
      |                   vector<vector<long long int>>