Submission #1051401

#TimeUsernameProblemLanguageResultExecution timeMemory
1051401LittleOrangeCarnival Tickets (IOI20_tickets)C++17
11 / 100
1 ms604 KiB
#include "tickets.h" #include <vector> #include<bits/stdc++.h> using namespace std; using ll = long long; long long find_maximum(int k, std::vector<std::vector<int>> x) { ll n = x.size(); ll m = x[0].size(); vector<vector<int>> ans(n,vector<int>(m,-1)); if (m == 1){ vector<ll> v; for(ll i = 0;i<n;i++) { v.push_back(x[i][0]); ans[i][0] = 0; } allocate_tickets(ans); sort(v.begin(),v.end()); ll sm = 0; for(ll i : v) sm += abs(i-v[v.size()/2]); return sm; } return 1; }
#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...