Submission #641299

#TimeUsernameProblemLanguageResultExecution timeMemory
641299Trisanu_DasBalloons (CEOI11_bal)C++17
100 / 100
556 ms8808 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int x[n], st[n+1], *p = st; double r[n]; for(int i=0; i<n; ++i){ cin >> x[i] >> r[i]; while(p != st){ r[i] = min(r[i], pow(x[*p]-x[i], 2)/(4.0*r[*p])); if(r[*p] < r[i]) --p; else break; } *(++p) = i; cout << fixed << setprecision(4) << r[i] << '\n'; } }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...