Submission #1129310

#TimeUsernameProblemLanguageResultExecution timeMemory
1129310justNile (IOI24_nile)C++20
6 / 100
29 ms4932 KiB
#include "bits/stdc++.h" using namespace std; #define all(x) (x).begin(), (x).end() #define ll long long #define vec vector vec<ll> into(const vec<int> &arr) { vec<ll> tmp(arr.size()); for (int i = 0; i < arr.size(); i++) tmp[i] = (ll)arr[i]; return tmp; } vec<ll> calculate_costs(vec<int> W_, vec<int> A_, vec<int> B_, vec<int> E_) { vec<ll> W = into(W_), A = into(A_), B = into(B_), E = into(E_); int n = W.size(); ll mind = INT_MAX; ll cost = 0; for (int i = 0; i < n; i++) mind = min(mind, A[i] - B[i]), cost += B[i]; if (n % 2 == 1) cost += mind; vec<ll> res(E.size(), (ll)cost); 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...