Submission #1291672

#TimeUsernameProblemLanguageResultExecution timeMemory
1291672kahoulCarnival Tickets (IOI20_tickets)C++20
0 / 100
1 ms344 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; long long find_maximum(int k, vector<vector<int>> x) { int n = x.size(); int m = x[0].size(); vector<vector<int>> answer; for (int i = 0; i < n; i++) { vector<int> row(m); for (int j = 0; j < m; j++) { row[j] = 0; } answer.push_back(row); } allocate_tickets(answer); int ans = 1e9; for (int i = 0; i < n; i++) { int resp = 0; for (int j = 0; j < n; j++) { resp += abs(x[i][0] - x[j][0]); } ans = min(ans, resp); } 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...