Submission #1075389

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10753892024-08-26 05:12:52HappyCapybaraCircle selection (APIO18_circle_selection)C++17
19 / 100
550 ms62640 KiB
#include<bits/stdc++.h>
using namespace std;
double eps = pow(10, -9);
double dist(int ax, int ay, int bx, int by){
return sqrt(pow(ax-bx, 2)+pow(ay-by, 2));
}
int main(){
int n;
cin >> n;
vector<vector<int>> v(n);
vector<pair<int,int>> ep;
for (int i=0; i<n; i++){
int x, y, r;
cin >> x >> y >> r;
v[i] = {-r, i, x, y};
}
sort(v.begin(), v.end());
for (int i=0; i<n; i++){
ep.push_back({v[i][2]+v[i][0], i});
ep.push_back({v[i][2]-v[i][0], i});
}
sort(ep.begin(), ep.end());
vector<vector<int>> fts(n);
for (int i=0; i<2*n; i++){
//cout << ep[i].first << " " << ep[i].second << "\n";
fts[ep[i].second].push_back(i);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...