제출 #1073428

#제출 시각아이디문제언어결과실행 시간메모리
1073428blushingecchigirl카니발 티켓 (IOI20_tickets)C++17
11 / 100
1 ms604 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back void allocate_tickets( std::vector<std::vector<int>> _x); ll find_maximum(int k, std::vector<std::vector<int>> d) { int n = d.size(); vector<int> v; for(int i = 0; i<n; i++) { v.pb(d[i][0]); d[i][0] = 0; } sort(v.begin(), v.end()); ll maximum = 0; for(int i = 0; i<n; i++) { maximum+=abs(v[i]-v[n/2]); } allocate_tickets(d); return maximum; }
#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...