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 long long MX=5e5+100;
vector < pair < int , int > > mas[MX];
set < pair < int , int > > ab;
vector < int > reb[MX];
int r,c,n;
int uk=0,nm=0;
void cnt()
{
map < int , int > as;
for(auto u:ab)
{
as[u.first-1]++;
as[u.first]++;
as[u.first+1]++;
}
for(auto & u:as)
{
uk++;
u.second=uk;
}
for(auto u:ab)
{
nm++;
mas[as[u.first]].push_back({u.second,nm});
}
for(int i=1;i<=uk;i++)
{
nm++;
mas[i].push_back({c+1,nm});
}
return;
}
void cnt2()
{
for(int i=1;i<=uk;i++)
{
}
}
int main()
{
cin.tie(0);
ios_base::sync_with_stdio(0);
cin>>r>>c>>n;
int a,b;
for(int i=1;i<=n;i++)
{
cin>>a>>b;
ab.insert({a,b});
}
cnt();
cnt2();
}
# | 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... |