結果
問題 |
No.3042 拡大コピー
|
ユーザー |
|
提出日時 | 2025-02-28 21:48:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 633 bytes |
コンパイル時間 | 710 ms |
コンパイル使用メモリ | 71,880 KB |
実行使用メモリ | 8,236 KB |
最終ジャッジ日時 | 2025-03-01 07:38:06 |
合計ジャッジ時間 | 2,562 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 23 |
ソースコード
#include<iostream> #include<iomanip> #include<cmath> #include<cassert> using namespace std; int N; long double rd() { pair<double,double>p=make_pair(0,0),sum=make_pair(0,0); for(int i=0;i<N;i++) { pair<double,double>q; cin>>q.first>>q.second; p=max(p,q); sum.first+=q.first; sum.second+=q.second; } sum.first/=N; sum.second/=N; return hypot(sum.first-p.first,sum.second-p.second); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin>>N; auto x=rd(); auto y=rd(); //cout<<fixed<<setprecision(16)<<hypot(y.first,y.second)/hypot(x.first,x.second)<<endl; cout<<fixed<<setprecision(16)<<y/x<<endl; }