#include <bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define sz(x) int(x.size())
#define in(x) freopen(x, "r", stdin)
#define out(x) freopen(x, "w", stdout)
#define N 100500
#define oo ll(1e16)
#define ft first
#define sd second
#define mp make_pair
#define pb push_back
#define ppb pop_back
#define el '\n'
#define elf endl
#define base ll(1e9 + 7)
using namespace std;
typedef long long ll;
typedef long double ld;
int n, m, xl[N], yl[N], xr[N], yr[N], x[N], y[N], k[N];
set <int> s[N];
int main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> n >> m;
for (int i = 0; i < n; i++)
cin >> xl[i] >> yl[i] >> xr[i] >> yr[i];
for (int i = 0; i < m; i++)
cin >> x[i] >> y[i] >> k[i];
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
if ((x[j] >= xl[i]) && (x[j] <= xr[i]) && (y[j] >= yl[i]) && (y[j] <= yr[i]))
s[i].insert(k[j]);
for (int i = 0; i < n; i++)
cout << sz(s[i]) << el;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2107 ms |
212792 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2102 ms |
321848 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2103 ms |
296480 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2105 ms |
259332 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2103 ms |
260144 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |