제출 #305037

#제출 시각아이디문제언어결과실행 시간메모리
305037srvlt카니발 티켓 (IOI20_tickets)C++14
11 / 100
2 ms768 KiB
#include "tickets.h" #include <vector> #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pb push_back #define all(x) begin(x), end(x) #define SZ(x) (int)(x).size() #define cps(x) sort(all(x)), (x).erase(unique(all(x)), end(x)) #define cps2(x, y) sort(all(x), y), (x).erase(unique(all(x)), end(x)) #define mem(x, y) memset(& x, y, sizeof(x)) mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); ll find_maximum(int k, vector<vector<int>> x) { int n = x.size(); int m = x[0].size(); vector<vector<int>> answer; ll res = 0; if (m == 1) { vector <int> vec; for (int i = 0; i < n; i++) { vector<int> row(m); row[0] = 0; vec.pb(x[i][0]); answer.push_back(row); } sort(all(vec)); for (int i : vec) res += abs(i - vec[n / 2]); } allocate_tickets(answer); return res; }
#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...