Submission #1008418

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10084182024-06-26 12:02:07snpmrnhlolCouncil (JOI23_council)C++17
100 / 100
596 ms30596 KiB
#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;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

council.cpp: In function 'int main()':
council.cpp:31:13: warning: unused variable 'cnt' [-Wunused-variable]
   31 |         int cnt = 0;
      |             ^~~
#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...