제출 #364026

#제출 시각아이디문제언어결과실행 시간메모리
364026b23v카니발 티켓 (IOI20_tickets)C++14
11 / 100
2 ms768 KiB
#include "tickets.h" #include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <climits> #include <cstring> using namespace std; using ll = long long; using ull = unsigned long long; using vi = vector<int>; using ii = pair<int,int>; using vii = vector<pair<int,int>>; using vb = vector<bool>; template<typename T> using Graph = vector<vector<T>>; ll find_maximum(int k, Graph<int> graph) { int n = int(graph.size()); int m = int(graph[0].size()); if(m != 1) abort(); vector<ll> v(n); Graph<int> res(n, vi(m, 0)); for(int i = 0; i < n; ++i) { v[i] = graph[i][0]; } sort(v.begin(), v.end()); ll mid = n / 2, ans = 0; for(ll x: v) ans += abs(x - v[mid]); allocate_tickets(res); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...