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;
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, m;
cin >> n >> m;
vector <pair <pair <int, int>, pair <int, int> > > pol(n);
for(int i = 0; i < n; i++)
{
cin >> pol[i].first.first >> pol[i].first.second >> pol[i].second.first >> pol[i].second.second;
}
vector <pair <int, int> > x(m);
vector <int> type(m);
for(int i = 0; i < m; i++)
{
cin >> x[i].first >> x[i].second >> type[i];
}
for(int i = 0; i < n; i++)
{
set <int> t;
for(int j = 0; j < m; j++)
{
if(x[j].first >= pol[i].first.first && x[j].first <= pol[i].second.first && x[j].second >= pol[i].first.second && x[j].second <= pol[i].second.second)
{
t.insert(type[j]);
}
}
cout << t.size() << "\n";
}
return 0;
}
# | 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... |