This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |