제출 #1124408

#제출 시각아이디문제언어결과실행 시간메모리
1124408FucKanhPlahte (COCI17_plahte)C++20
0 / 160
2112 ms492356 KiB
#include<bits/stdc++.h> #define pii pair<int,int> using namespace std; const int maxn = 8e4 + 2; priority_queue<pii,vector<pii>,greater<pii>> qpin,qpout; pair<pii,pii> rec[maxn]; set<pii> ms; int pa[maxn]; set<int> st[maxn]; tuple<int,int,int> colour[maxn]; vector<int> a[maxn]; int ans[maxn]; vector<pii> DEL[maxn]; void dfs(int u) { for (int v : a[u]) { dfs(v); if (st[v].size() > st[u].size()) swap(st[v],st[u]); for (int val : st[v]) st[u].insert(val); } ans[u] = st[u].size(); } signed main() { cin.tie(0)->sync_with_stdio(0); // freopen("LOANGMUC.INP", "r", stdin); // freopen("LOANGMUC.OUT", "w", stdout); int n,m; cin >> n >> m; for (int i = 1; i <= n; i++) { int x,y; cin >> x >> y; int x2,y2; cin >> x2 >> y2; rec[i].first = {x,y}; rec[i].second = {x2,y2}; } for (int i = 1; i <= m; i++) { int x,y,c; cin >> x >> y >> c; for (int j = 1; j <= n; j++) { if (rec[j].first.first <= x && rec[j].first.second <= y && rec[j].second.first >= x && rec[j].second.second >= y) { st[j].insert(c); } } } for (int i = 1; i <= n; i++) { cout << st[i].size() << '\n'; } }
#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...