結果
| 問題 |
No.3042 拡大コピー
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-28 22:19:02 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,101 bytes |
| コンパイル時間 | 1,930 ms |
| コンパイル使用メモリ | 198,172 KB |
| 実行使用メモリ | 8,236 KB |
| 最終ジャッジ日時 | 2025-03-01 07:38:55 |
| 合計ジャッジ時間 | 3,118 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template<class T> istream& operator >> (istream& is, vector<T>& vec) {
for(T& x : vec) is >> x;
return is;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<pair<int,int>> a(n), b(n);
ll X0 = 0, Y0 = 0, X1 = 0, Y1 = 0;
ll sx0 = 0, sy0 = 0, sx1 = 0, sy1 = 0;
for(auto &&[x, y] : a){
cin >> x >> y;
X0 += x, Y0 += y;
}
for(auto &&[x, y] : b){
cin >> x >> y;
X1 += x, Y1 += y;
}
//double GX0 = double(X0) / n, GY0 = double(Y0) / n;
//double GX1 = double(X1) / n, GY1 = double(Y1) / n;
__int128 s0 = 0, s1 = 0;
for(auto &&[x, y] : a){
__int128 dx = (ll)(n) * x - X0;
__int128 dy = (ll)(n) * y - Y0;
s0 = max(s0, dx * dx + dy * dy);
}
for(auto &&[x, y] : b){
__int128 dx = (ll)(n) * x - X1;
__int128 dy = (ll)(n) * y - Y1;
s1 = max(s1, dx * dx + dy * dy);
}
cout << fixed << setprecision(15) << (double)sqrtl((long double)(s1) / s0) << '\n';
}