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;
long long n , m , in [500005] , de [500005] , inmx [500005] , demx [500005] , mod = 1e9 + 7;
long long tree [2000006][28];
int main()
{
cin >> n >> m;
for ( int i = 1 ; i <= n ; i ++ )
{
in [i] = 1e9;
de [i] = 1e9;
}
for ( int i = 0 ; i < m ; i ++ )
{
long long x , y;
cin >> x >> y;
if ( x < y )
{
de [x] = min ( de [x] , y );
demx [x] = max ( demx [x] , y );
}
if ( x > y )
{
in [y] = min ( in [y] , x );
inmx [y] = max ( inmx [y] , x );
}
}
}
# | 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... |