Submission #714656

#TimeUsernameProblemLanguageResultExecution timeMemory
714656TheSahibPlahte (COCI17_plahte)C++14
0 / 160
2086 ms447668 KiB
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> using namespace std; const int MAX = 8e4 + 8; set<int> colors[MAX]; int n, m; int squares[MAX][4]; int points[MAX][3]; int main(){ cin >> n >> m; for (int i = 0; i < n; i++) { cin >> squares[i][0] >> squares[i][1] >> squares[i][2] >> squares[i][3]; } for (int i = 0; i < m; i++) { cin >> points[i][0] >> points[i][1] >> points[i][2]; } for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if(squares[j][0] <= points[i][0] && squares[j][2] >= points[i][0] && squares[j][1] <= points[i][1] && squares[j][3] >= points[i][1]){ colors[j].insert(points[i][2]); } } } for (int i = 0; i < n; i++) { cout << colors[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...