제출 #584566

#제출 시각아이디문제언어결과실행 시간메모리
584566israeladewuyiBalloons (CEOI11_bal)C++17
10 / 100
616 ms6192 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define int ll #define endl "\n" int N; int32_t main(){ cin>>N; stack<pair<long double, long double>>St; int answer = 0; for(int i = 0; i < N; i++){ long double pos, radius; cin>>pos>>radius; if(i == 0){ cout<<fixed<<setprecision(10)<<radius<<endl; St.push({pos, radius}); } else{ while(!St.empty()){ auto cur = St.top(); long double pp = cur.first; long double radd = cur.second; radius = min((long double)radius, (long double)((pos - pp) * (pos - pp)) / (long double)(4 * radd)); if(radius >= radd){ St.pop(); } else break; } cout<<fixed<<setprecision(10)<<radius<<endl; } } return 0; }

컴파일 시 표준 에러 (stderr) 메시지

bal.cpp: In function 'int32_t main()':
bal.cpp:13:6: warning: unused variable 'answer' [-Wunused-variable]
   13 |  int answer = 0;
      |      ^~~~~~
#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...