Submission #1133300

#TimeUsernameProblemLanguageResultExecution timeMemory
1133300alterioCarnival Tickets (IOI20_tickets)C++20
11 / 100
1 ms836 KiB
#include <bits/stdc++.h> #include "tickets.h" using namespace std; #define ll long long #define all(x) (x).begin(), (x).end() ll get(vector<ll> vals) { int mid = vals.size() / 2; ll ans = 0; for (auto x : vals) ans += abs(vals[mid] - x); return ans; } ll find_maximum(int k, vector<vector<int>> x) { int n = x.size(); int m = x[0].size(); vector<vector<int>> answer; vector<ll> v; for (int i = 0; i < n; i++) { v.push_back({x[i][0]}); answer.push_back({0}); } sort(all(v)); allocate_tickets(answer); return get(v); }
#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...