제출 #411097

#제출 시각아이디문제언어결과실행 시간메모리
411097kwongweng카니발 티켓 (IOI20_tickets)C++17
11 / 100
2 ms688 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef long double ld; #define FOR(i, a, b) for(int i = a; i < b; i++) #define ROF(i, a, b) for(int i = a; i >= b; i--) #define ms memset #define pb push_back #define F first #define S second ll MOD = 998244353; ll power(ll base, ll n){ if (n == 0) return 1; if (n == 1) return base; ll halfn = power(base, n/2); if (n % 2 == 0) return (halfn * halfn) % MOD; return (((halfn * halfn) % MOD) * base) % MOD; } ll inverse(ll n){ return power(n, MOD-2); } ll add(ll a, ll b){ return (a+b) % MOD; } ll mul(ll a, ll b){ return (a*b) % MOD; } ll gcd(ll a, ll b){ if (a == 0) return b; if (a == 1) return 1; return gcd(b % a, a); } ll find_maximum(int k, vector<vi> x) { int n = x.size(); int m = x[0].size(); vi a(n); vector<vi> ans; FOR(i, 0, n){ vi row(m); ans.pb(row); a[i] = x[i][0]; } sort(a.begin(), a.end()); ll cnt = 0; FOR(i, n/2, n) cnt += a[i] - a[i-n/2]; allocate_tickets(ans); return cnt; }
#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...