Submission #769109

#TimeUsernameProblemLanguageResultExecution timeMemory
769109t6twotwoCarnival Tickets (IOI20_tickets)C++17
0 / 100
1 ms304 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(); allocate_tickets(vector(N, vector{0})); ll s = 0; for (int i = 0; i < N; i++) { s += abs(x[N / 2][0] - x[i][0]); } return s; }

Compilation message (stderr)

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:7:6: warning: unused variable 'M' [-Wunused-variable]
    7 |  int M = x[0].size();
      |      ^
#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...