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>
#define int long long
using namespace std;
int n,m;
pair<pair<int,int>,pair<int,int>> v[80001];
bitset<80001> col[80001];
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
cin>>n>>m;
for(int i=0; i<n; i++) {
int a,b,c,d; cin>>a>>b>>c>>d;
v[i] = {{a,b},{c,d}};
}
for(int i=0; i<m; i++) {
int x,y,c; cin>>x>>y>>c;
for(int j=0; j<n; j++) {
if(v[j].first.first<=x && x<=v[j].second.first && v[j].first.second<=y && y<=v[j].second.second) col[j][c] = 1;
}
}
for(int i=0; i<n; i++) cout<<col[i].count()<<'\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... |