# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1008418 | snpmrnhlol | Council (JOI23_council) | C++17 | 596 ms | 30596 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
const int N = 3e5;
const int M = 20;
pair<int,int> f[1<<M][2];
int f2[M];
int v[N];
void add(int pos,int x,int id){
for(int i = 0;i < 2;i++){
if(f[pos][i].second == id){
f[pos][i].first = max(f[pos][i].first, x);
if(f[pos][0].first < f[pos][1].first)swap(f[pos][0],f[pos][1]);
return;
}
}
for(int i = 0;i < 2;i++){
if(pair<int,int>{x,id} > f[pos][i]){
pair<int,int> tmp = f[pos][i];
f[pos][i] = {x,id};
//cout<<x<<' '<<id<<' '<<pos<<' '<<i<<"ll\n";
x = tmp.first;
id = tmp.second;
}
}
}
int main(){
int n,m;
cin>>n>>m;
for(int i = 0;i < n;i++){
int nr = 0;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |