# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
881710 | alexdd | Schools (IZhO13_school) | C++17 | 448 ms | 7464 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 NRIT = 1e7;
int n,m,s;
pair<int,int> v[300005];
mt19937 rnd(921831);
int unde[300005];
signed main()
{
ios_base::sync_with_stdio(0);cin.tie(0);
cin>>n>>m>>s;
for(int i=0;i<n;i++)
{
cin>>v[i].first>>v[i].second;
if(i<m)
unde[i]=1;
else if(i<m+s)
unde[i]=2;
}
for(int pas=0;pas<NRIT;pas++)
{
int x = rnd()%n;
int y = rnd()%n;
if(unde[x]==unde[y])
continue;
if(unde[y]==0)
swap(x,y);
if(unde[x]==0)
{
if(unde[y]==1)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |