Submission #1176057

#TimeUsernameProblemLanguageResultExecution timeMemory
1176057qs1Balloons (CEOI11_bal)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define lli long long int #define ld long double #define mp make_pair int main(){ lli x; ld a,r,mn; stack<pair<ld,ld>>v;//{x,radius/y} cin>>x; cout<<setprecision(16); while(x--){ cin>>a>>r; mn=999999999; while(!v.empty()&&(a-v.top().first)/(4)/(v.top().second)*(a-v.top().first)>=v.top().second){ mn=min(mn,(a-v.top().first)/(4)/(v.top().second)*(a-v.top().first); v.pop(); } r=min(r,mn); if(v.empty()){ cout<<r<<endl; } else{ r=min(r,(a-v.top().first)/(4)/(v.top().second)*(a-v.top().first)); cout<<r<<endl; } v.push(mp(a,r)); } }

Compilation message (stderr)

bal.cpp: In function 'int main()':
bal.cpp:18:73: error: expected ')' before ';' token
   18 |       mn=min(mn,(a-v.top().first)/(4)/(v.top().second)*(a-v.top().first);
      |             ~                                                           ^
      |                                                                         )