# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
714646 |
2023-03-25T07:13:49 Z |
Toxtaq |
Plahte (COCI17_plahte) |
C++17 |
|
2000 ms |
283636 KB |
#include <bits/stdc++.h>
using namespace std;
struct Rectangle{
int x1, y1, x2, y2;
};
struct Point{
int x, y, color_id;
};
bool IsInside(Point p, Rectangle r){
return (p.x >= r.x1 && p.x <= r.x2 && p.y >= r.y1 && p.y <= r.y2);
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<Rectangle>rectangles(n);
for(int i = 0;i < n;++i){
cin >> rectangles[i].x1 >> rectangles[i].y1 >> rectangles[i].x2 >> rectangles[i].y2;
}
vector<Point>points(m);
for(int i = 0;i < m;++i){
cin >> points[i].x >> points[i].y >> points[i].color_id;
}
vector<unordered_set<int>>num_of_diff_colors(n);
for(int i = 0;i < m;++i){
for(int j = 0;j < n;++j){
if(IsInside(points[i], rectangles[j])){
num_of_diff_colors[j].insert(points[i].color_id);
}
}
}
for(int i = 0;i < n;++i){
cout << num_of_diff_colors[i].size() << '\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2061 ms |
169904 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2077 ms |
256920 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2055 ms |
278804 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2070 ms |
283636 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2070 ms |
241408 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |