제출 #300371

#제출 시각아이디문제언어결과실행 시간메모리
300371junseo카니발 티켓 (IOI20_tickets)C++17
11 / 100
2 ms768 KiB
#include "tickets.h" #include <bits/stdc++.h> #define fi first #define se second #define eb emplace_back #define all(v) (v).begin(), (v).end() #define rmin(r, x) r = min(r, x) #define rmax(r, x) r = max(r, x) #define ends ' ' #define endl '\n' #define fastio ios_base::sync_with_stdio(0), cin.tie(0) using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int maxn = 1510; const int maxm = 1510; int n, m; vector<vector<int>> ans; long long find_maximum(int k, vector<vector<int>> x) { n = x.size(); m = x[0].size(); ans.resize(n); for(int i = 0; i < n; ++i) ans[i].resize(m); vector<int> v; for(int i = 0; i < n; ++i) v.eb(x[i][0]); sort(all(v)); ll ret = 0; for(int i = 0; i < n; ++i) ret += abs(v[i] - v[n / 2]); allocate_tickets(ans); return ret; }
#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...