# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
240601 |
2020-06-20T08:48:36 Z |
sven |
Sweeping (JOI20_sweeping) |
C++14 |
|
18000 ms |
5576 KB |
#include <bits/stdc++.h>
using namespace std;
struct Point
{
int x , y;
};
vector <Point> points;
int main()
{
int taille , nbPoints , nbQuestions;
cin >> taille >> nbPoints >> nbQuestions;
for (int i = 0 ; i < nbPoints ; i++)
{
points.push_back({0 , 0});
cin >> points[i].x >> points[i].y;
}
for (int i = 0 ; i < nbQuestions ; i++)
{
int T;
cin >> T;
if (T == 4)
{
int a,b;
cin >> a >> b;
points.push_back({a,b});
nbPoints++;
}
else if (T == 1)
{
int id;
cin >> id;
id--;
cout<<points[id].x<<" "<<points[id].y<<endl;
}
else if (T == 3)
{
int l;
cin >> l;
for (int j = 0 ; j < nbPoints ; j++)
{
if (points[j].x <= l)
{
points[j].y = max(points[j].y , taille - l);
}
}
}
else
{
int l;
cin >> l;
for (int j = 0 ; j < nbPoints ; j++)
{
if (points[j].y <= l)
{
points[j].x = max(points[j].x , taille - l);
}
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
512 KB |
Output is correct |
2 |
Correct |
15 ms |
384 KB |
Output is correct |
3 |
Correct |
16 ms |
512 KB |
Output is correct |
4 |
Correct |
24 ms |
512 KB |
Output is correct |
5 |
Correct |
33 ms |
384 KB |
Output is correct |
6 |
Correct |
18 ms |
512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
18050 ms |
5316 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
18076 ms |
5576 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
18076 ms |
5576 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
512 KB |
Output is correct |
2 |
Correct |
15 ms |
384 KB |
Output is correct |
3 |
Correct |
16 ms |
512 KB |
Output is correct |
4 |
Correct |
24 ms |
512 KB |
Output is correct |
5 |
Correct |
33 ms |
384 KB |
Output is correct |
6 |
Correct |
18 ms |
512 KB |
Output is correct |
7 |
Execution timed out |
18050 ms |
5316 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |