#include <bits/stdc++.h>
#define sz(x) ((int)x.size())
using namespace std;
typedef long long ll;
const int N = 80100;
const int oo = 2e9;
unordered_set<int> st;
int a[N], b[N], c[N], d[N], n, m, x[N], y[N], k[N];
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef _LOCAL
freopen("in.txt","r",stdin);
#endif // _LOCAL
cin >> n >> m;
for (int i = 0; i < n; i++)
cin >> a[i] >> b[i] >> c[i] >> d[i];
for (int i = 0; i < m; i++) {
cin >> x[i] >> y[i] >> k[i];
assert(st.find(k[i]) == st.end());
st.insert(k[i]);
}
for (int i = 0; i < n; i++){
int ans = 0;
for (int j = 0; j < m; j++)
if (a[i] <= x[j] && c[i] >= x[j] && b[i] <= y[j] && d[i] >= y[j])
ans++;
cout << ans << '\n';
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
17 ms |
2048 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
23 ms |
2936 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
34 ms |
4216 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
52 ms |
6008 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
52 ms |
6008 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |