Submission #1054890

#TimeUsernameProblemLanguageResultExecution timeMemory
1054890c2zi6Carnival Tickets (IOI20_tickets)C++14
11 / 100
1 ms860 KiB
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #define ff first #define ss second #define pb push_back #define all(a) (a).begin(), (a).end() #define replr(i, a, b) for (int i = int(a); i <= int(b); ++i) #define reprl(i, a, b) for (int i = int(a); i >= int(b); --i) #define rep(i, n) for (int i = 0; i < int(n); ++i) #define mkp(a, b) make_pair(a, b) using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<PII> VPI; typedef vector<VI> VVI; typedef vector<VVI> VVVI; typedef vector<VPI> VVPI; typedef pair<ll, ll> PLL; typedef vector<ll> VL; typedef vector<PLL> VPL; typedef vector<VL> VVL; typedef vector<VVL> VVVL; typedef vector<VPL> VVPL; template<class T> T setmax(T& a, T b) {if (a < b) return a = b; return a;} template<class T> T setmin(T& a, T b) {if (a < b) return a; return a = b;} #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; template<class T> using indset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #include "tickets.h" namespace TEST1 { ll find_maximum(int k, VVI table) { int n = table.size(); int m = table[0].size(); VI a; rep(i, n) a.pb(table[i][0]); sort(all(a)); ll ans = 0; rep(i, n/2) ans -= a[i]; rep(i, n/2) ans += a[i + n/2]; VVI answ(n, VI(m, 0)); allocate_tickets(answ); return ans; } }; ll find_maximum(int k, VVI table) { int n = table.size(); int m = table[0].size(); if (m == 1) return TEST1::find_maximum(k, table); return 1; }

Compilation message (stderr)

tickets.cpp: In function 'll find_maximum(int, VVI)':
tickets.cpp:51:6: warning: unused variable 'n' [-Wunused-variable]
   51 |  int n = table.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...