#include <bits/stdc++.h>
using namespace std;
#define pii array<int,2>
#define tii array<int,3>
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n,m;cin>>n>>m;
vector<array<pii, 2>> v(n);
for (auto &x:v) {
cin>>x[0][0]>>x[0][1]>>x[1][0]>>x[1][1];
}
vector<tii> pts(m);
for (auto &x:pts) {
cin>>x[0]>>x[1]>>x[2];
assert(x[2] <= 2*m);
}
for (auto &x:v) {
vector<int> vv;
for (auto &y : pts) {
if (x[0][0] > y[0] || y[0] > x[1][0]) continue;
if (x[0][1] > y[1] || y[1] > x[1][1]) continue;
vv.push_back(y[2]);
}
sort(vv.begin(), vv.end());
vv.erase(unique(vv.begin(), vv.end()), vv.end());
cout<<vv.size()<<"\n";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
7 ms |
1884 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
10 ms |
2140 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2047 ms |
2624 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2058 ms |
3512 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2044 ms |
3644 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |