Submission #240601

#TimeUsernameProblemLanguageResultExecution timeMemory
240601svenSweeping (JOI20_sweeping)C++14
1 / 100
18076 ms5576 KiB
#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 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...