제출 #305390

#제출 시각아이디문제언어결과실행 시간메모리
305390JooDdae카니발 티켓 (IOI20_tickets)C++17
11 / 100
2 ms768 KiB
#include "tickets.h" #include<bits/stdc++.h> using namespace std; using ll = long long; long long find_maximum(int k, std::vector<std::vector<int>> x) { int n = x.size(); int m = x[0].size(); vector<vector<int>> v(n, vector<int>(m)); allocate_tickets(v); vector<int> v2; for(int i=0;i<n;i++) v2.push_back(x[i][0]); sort(v2.begin(), v2.end()); ll ans = 0; for(int i=0;i<n/2;i++) ans -= v2[i]; for(int i=n/2;i<n;i++) ans += v2[i]; return ans; }
#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...