제출 #1300051

#제출 시각아이디문제언어결과실행 시간메모리
1300051opeleklanos카니발 티켓 (IOI20_tickets)C++20
컴파일 에러
0 ms0 KiB
#include <iostream> #include <algorithm> #include <vector> #include "tickets.h" using namespace std; #define ll long long ll find_maximum(int k, vector<vector<int>> x){ ll n = x.size(); ll m = x[0].size(); if(m == 1){ sort(x.begin(), x.end()); ll ans = 0; for(ll i = 0; i<n/2; i++) ans -= x[i][0]; for(ll i = n/2; i<n; i++) ans += x[i][0]; vector<vector<ll>> arr(n, vector<ll>(1, 0)); allocate_tickets(arr); return ans; } }

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

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:19:26: error: could not convert 'arr' from 'vector<vector<long long int>>' to 'vector<vector<int>>'
   19 |         allocate_tickets(arr);
      |                          ^~~
      |                          |
      |                          vector<vector<long long int>>
tickets.cpp:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^