Submission #234411

#TimeUsernameProblemLanguageResultExecution timeMemory
234411VEGAnnPlahte (COCI17_plahte)C++14
0 / 160
2087 ms2808 KiB
#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]; for (int i = 0; i < n; i++){ int ans = 0; st.clear(); for (int j = 0; j < m; j++) if (a[i] <= x[j] && c[i] >= x[j] && b[i] <= y[j] && d[i] >= y[j] && st.find(k[j]) == st.end()){ ans++; st.insert(k[i]); } cout << ans << '\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...