結果

問題 No.3042 拡大コピー
ユーザー Drosera
提出日時 2025-03-01 07:53:05
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 951 bytes
コンパイル時間 3,353 ms
コンパイル使用メモリ 273,592 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-03-01 07:53:12
合計ジャッジ時間 7,058 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(int)n; i++)
#define repi(i,m,n) for(int i=(int)m; i<=(int)n; i++)
#define rrep(i,n) for(int i=(int)n-1; i>=0; i--)
#define rrepi(i,m,n) for(int i=(int)n; i>=(int)m; i--)
#define all(x) x.begin(),x.end()
template <typename T> inline bool chmin(T& a, const T& b) { return a > b ? a = b, true : false; };
template <typename T> inline bool chmax(T& a, const T& b) { return a < b ? a = b, true : false; };
template <typename T> void uniq(std::vector<T> &v){
    std::sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
}
using ll = long long;

int main(){
    int n; cin >> n;
    double sx = 0,sy = 0,tx = 0,ty = 0,x,y;
    rep(i,n){
        cin >> x >> y;
        sx += x; sy += y;
    }
    rep(i,n){
        cin >> x >> y;
        tx += x; ty += y;
    }

    cout << fixed << setprecision(15) << hypot(tx,ty)/hypot(sx,sy) << endl;
    
    return 0;
}
0