제출 #1072667

#제출 시각아이디문제언어결과실행 시간메모리
1072667LCJLY카니발 티켓 (IOI20_tickets)C++14
0 / 100
0 ms348 KiB
#include <bits/stdc++.h> #include "tickets.h" //#include "grader.cpp" using namespace std; #define show(x,y) cout << y << " " << #x << endl; #define show2(x,y,i,j) cout << y << " " << #x << " " << j << " " << #i << endl; #define show3(x,y,i,j,p,q) cout << y << " " << #x << " " << j << " " << #i << " " << q << " " << #p << endl; #define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl; typedef pair<int,int>pii; typedef pair<int,pii>pi2; //allocate_tickets(vector<vector<int>>) long long find_maximum(int k, vector<vector<int>>arr){ int n = arr.size(); int m = arr[0].size(); sort(arr[0].begin(),arr[0].end()); long long counter=0; vector<vector<int>>ans; ans.resize(n); vector<int>v; for(int x=0;x<n;x++){ ans[x]=vector<int>(m,0); v.push_back(arr[x][0]); } for(int x=0;x<n/2;x++){ counter+=abs(v[x]-v[m-1-x]); } allocate_tickets(ans); return counter; }
#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...