Submission #956407

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9564072024-04-01 18:50:47MinaRagy06The Potion of Great Power (CEOI20_potion)C++17
100 / 100
2778 ms257772 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define sz(x) (int) x.size()
const int N = 100'005, D = 505;
vector<vector<array<int, 2>>> gud[N];
vector<int> rem[N];
int mx[N];
set<array<int, 2>> adj[N];
int a[N], n, m;
void init(int _n, int d, int h[]) {
n = _n;
for (int i = 0; i < n; i++) {
for (int j = 499; j >= 0; j--) {
rem[i].push_back(j);
}
a[i] = h[i];
}
}
void upd(int i, int j, int v, int t) {
gud[i][j].push_back({v, t});
}
void curseChanges(int _m, int A[], int B[]) {
m = _m;
for (int i = 0; i < m; i++) {
int u = A[i], v = B[i];
auto it = adj[u].lower_bound({v, 0});
if (it != adj[u].end() && (*it)[0] == v) {
int x = (*it)[1];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...