# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1144485 | crafticat | Zalmoxis (BOI18_zalmoxis) | C++20 | 429 ms | 66188 KiB |
#include <bits/stdc++.h>
using namespace std;
#define F0R(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b - 1;i>=a;i--)
template<typename T>
using V = vector<T>;
using vi = V<int>;
using pi = pair<int,int>;
const int INF=1e9+7;
int main() {
ios_base::sync_with_stdio(false); cin.tie(nullptr);
int n, k; cin >> n >> k;
vi arr(n);
F0R(i, n)
cin >> arr[i];
V<V<pi>> sets(31);
F0R(i, n) {
sets[arr[i]].emplace_back(i, i + 1);
}
V<pi> newArr;
multiset<pi, greater<>> fakes;
F0R(i, n) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |