제출 #364088

#제출 시각아이디문제언어결과실행 시간메모리
364088knightron0카니발 티켓 (IOI20_tickets)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "tickets.h" using namespace std; #define pb push_back #define fr first #define sc second #define clr(a, x) memset(a, x, sizeof(a)) #define dbg(x) cout<<"("<<#x<<"): "<<x<<endl; #define printvector(arr) for (auto it = arr.begin(); it != arr.end(); ++it) cout<<*it<<" "; cout<<endl; #define all(v) v.begin(), v.end() #define lcm(a, b) (a * b)/__gcd(a, b) #define printvecpairs(vec) for(auto it: vec) cout<<it.fr<<' '<<it.sc<<endl; #define endl '\n' #define float long double #define lli long long int const int MOD = 1e9 + 7; const int MAXN = 1e5 + 5; lli find_maximum(int k, vector<vector<int>> x){ int n = (int)x.size(); llo m = (int)x[0].size(); vector<vector<int>> s; vector<int> vec; for(int i= 0;i<n;i++){ vec.pb(x[i][0]); vector<int> tmp; tmp.pb(0); s.pb(tmp); } sort(all(vec)); allocate_tickets(s); lli idx = vec.size()/2; lli idx2 = idx-1; lli ans1 = 0; lli ans2 = 0; for(int i= 0;i<n;i++){ ans1 += abs((lli)vec[idx]-(lli)vec[i]); ans2 += abs((lli)vec[idx2]-(lli)vec[i]); } return min(ans1, ans2); } // signed main() { // ios_base::sync_with_stdio(false); // cin.tie(NULL); // #ifdef LOCAL // freopen("input.txt", "r", stdin); // #endif // int n, m; // cin>>n>>m; // vector<vector<int>> a; // for(int i= 0;i<n;i++){ // vector<int> tmp; // for(int j= 0;j<m;j++){ // int t1; // cin>>t1; // tmp.pb(t1); // } // a.pb(tmp); // } // cout<<find_maximum(0, a)<<endl; // return 0; // }

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

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:23:2: error: 'llo' was not declared in this scope; did you mean 'lli'?
   23 |  llo m = (int)x[0].size();
      |  ^~~
      |  lli