Submission #1312491

#TimeUsernameProblemLanguageResultExecution timeMemory
1312491MunkhErdeneFestival (IOI25_festival)C++17
5 / 100
68 ms9580 KiB
#include "festival.h" #include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define ff first #define ss second #define _ << " " << #define yes cout<<"YES\n" #define no cout<<"NO\n" #define ull unsigned long long #define lll __int128 #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define BlueCrowner ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define FOR(i, a, b) for (ll i = (a); i < (b); i++) #define FORD(i, a, b) for (ll i = (a); i >= (b); i--) const ll mod = 1e9 + 7; const ll mod1 = 998244353; const ll naim = 1e9; const ll max_bit = 60; const ull tom = ULLONG_MAX; const ll MAXN = 100005; const ll LOG = 20; const ll NAIM = 1e18; const ll N = 2e6 + 5; std::vector<int> max_coupons(int A, std::vector<int> P, std::vector<int> T) { ll a = A; vector<ll> p(all(P)), t(all(T)); ll n = p.size(); vector<ll> ord(n); iota(all(ord), 0); sort(all(ord), [&](ll i, ll j) { ll x = p[i], y = p[j], t1 = t[i], t2 = t[j]; if(t1 == t2) return x < y; return t1 > t2; }); vector<int> res; for(auto &i : ord) { if(a >= p[i]) { res.pb(i); a -= p[i]; a *= t[i]; } } return res; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...