Submission #929050

#TimeUsernameProblemLanguageResultExecution timeMemory
929050NourWaelPlahte (COCI17_plahte)C++17
0 / 160
2097 ms494224 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int const mxN = 2e5+5; int n,m; pair<pair<int,int>,pair<int,int>> v[80005]; set<int> col[80005]; signed main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); cin>>n>>m; for(int i=0; i<n; i++) { int a,b,c,d; cin>>a>>b>>c>>d; v[i] = {{a,b},{c,d}}; } for(int i=0; i<m; i++) { int x,y,c; cin>>x>>y>>c; for(int j=0; j<n; j++) { if(v[j].first.first<=x && x<=v[j].second.first && v[j].first.second<=y && y<=v[j].second.second) col[j].insert(c); } } for(int i=0; i<n; i++) cout<<col[i].size()<<'\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...