Submission #603130

#TimeUsernameProblemLanguageResultExecution timeMemory
603130Jarif_RahmanCarnival Tickets (IOI20_tickets)C++17
11 / 100
1 ms596 KiB
#include "tickets.h" #include <bits/stdc++.h> #define pb push_back #define f first #define sc second using namespace std; typedef long long int ll; typedef string str; ll find_maximum(int k, vector<vector<int>> v){ int n = v.size(), m = v[0].size(); vector<vector<int>> rt(n, {0}); allocate_tickets(rt); ll ans = 0; sort(v.begin(), v.end()); for(int i = 0; i < n/2; i++) ans-=v[i][0]; for(int i = n/2; i < n; i++) ans+=v[i][0]; return ans; }

Compilation message (stderr)

tickets.cpp: In function 'll find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:11:23: warning: unused variable 'm' [-Wunused-variable]
   11 |     int n = v.size(), m = v[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...