# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
431521 | 2021-06-17T12:41:31 Z | Rouge_Hugo | Carnival Tickets (IOI20_tickets) | C++14 | 2 ms | 716 KB |
#include<bits/stdc++.h> #define ll long long #define fi first #define se second #define pb push_back #include "tickets.h" #include <vector> using namespace std; vector<ll>v; 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; row.pb(0);v.pb(x[i][0]); answer.push_back(row); } allocate_tickets(answer); ll re=0; sort(v.begin(),v.end()); for(int i=0;i<n;i++) { re+=abs(v[i]-v[n/2]); } return re; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 288 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 332 KB | Output is correct |
6 | Correct | 2 ms | 716 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | WA in grader: allocate_tickets called with parameter of wrong size |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | WA in grader: allocate_tickets called with parameter of wrong size |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | WA in grader: allocate_tickets called with parameter of wrong size |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | WA in grader: allocate_tickets called with parameter of wrong size |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | WA in grader: allocate_tickets called with parameter of wrong size |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 288 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 332 KB | Output is correct |
6 | Correct | 2 ms | 716 KB | Output is correct |
7 | Incorrect | 1 ms | 204 KB | WA in grader: allocate_tickets called with parameter of wrong size |
8 | Halted | 0 ms | 0 KB | - |