제출 #307124

#제출 시각아이디문제언어결과실행 시간메모리
307124Ruxandra985카니발 티켓 (IOI20_tickets)C++14
0 / 100
1 ms256 KiB
#include <bits/stdc++.h> #include "tickets.h" #define DIMN 1510 using namespace std; pair <int , int> v[DIMN]; long long find_maximum(int k, vector<vector<int>> x) { int n = x.size() , i; int m = x[0].size(); long long sol = 0; vector<vector<int>> answer; for (i = 0; i < n; i++) { vector<int> row(m); answer.push_back(row); } if (m == 1){ for (i = 0 ; i < n ; i++){ answer[i][0] = 1; v[i] = make_pair(x[i][0] , i); } sort (v , v + n); for (i = 0 ; i < n ; i++){ if (i < n / 2) sol = sol - v[i].first; else sol = sol + v[i].first; } } allocate_tickets(answer); return sol; }
#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...