Submission #734784

#TimeUsernameProblemLanguageResultExecution timeMemory
734784keisuke6Circle selection (APIO18_circle_selection)C++14
0 / 100
3071 ms9648 KiB
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int N; cin>>N; vector<int> X(N),Y(N),R(N); for(int i=0;i<N;i++) cin>>X[i]>>Y[i]>>R[i]; vector<int> A(N,N); for(int i=0;i<N;i++){ for(int j=0;j<N;j++){ if((X[i]-X[j])*(X[i]-X[j])+(Y[i]-Y[j])*(Y[i]-Y[j]) > (R[i]+R[j])*(R[i]+R[j])) continue; if(A[j] == N || R[A[j]] < R[i] || (R[A[j]] == R[i] && A[j] >= i)){ A[j] = i; } } } for(int i=0;i<N;i++) cout<<A[i]+1<<' '; cout<<endl; }
#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...