# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
542776 | chonka | Making Friends on Joitter is Fun (JOI20_joitter2) | C++98 | 1979 ms | 170612 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 ;
#define MAXN 300007
int n , m ;
pair < int , int > a[ MAXN ] ;
set < int > v[ MAXN ] ;
map < int , int > entering[ MAXN ] ;
map < int , int > leaving[ MAXN ] ;
set < int > all_entering[ MAXN ] ;
int sm_entering[ MAXN ] ;
int prv[ MAXN ] ;
int cnt[ MAXN ] , sz[ MAXN ] ;
long long ans = 0 ;
int get ( int x ) {
if ( prv[ x ] == -1 ) { return x ; }
int y = get ( prv[ x ] ) ;
prv[ x ] = y ;
return y ;
}
void unite ( int x , int y ) {
int k1 = get ( x ) ;
int k2 = get ( y ) ;
vector < int > to_unite ;
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... |