Submission #237217

#TimeUsernameProblemLanguageResultExecution timeMemory
237217MlxaPlahte (COCI17_plahte)C++14
0 / 160
2090 ms11564 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll #define all(x) x.begin(), x.end() #define x first #define y second #define mp make_pair #define mt make_tuple const int N = 1e5; int n; int m; int a[N]; int b[N]; int c[N]; int d[N]; int x[N]; int y[N]; int k[N]; signed main() { #ifdef LC assert(freopen("input.txt", "r", stdin)); #endif ios::sync_with_stdio(0); cin.tie(0); 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]; } for (int i = 0; i < n; ++i) { vector<int> v; for (int j = 0; j < m; ++j) { if (a[i] <= x[j] && x[j] <= c[i] && b[i] <= y[j] && y[j] <= d[i]) { v.push_back(k[j]); } } sort(all(v)); cout << (unique(all(v)) - v.begin()) << "\n"; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...