結果

問題 No.2420 Simple Problem
ユーザー throughthrough
提出日時 2023-08-12 14:19:58
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 760 bytes
コンパイル時間 2,086 ms
コンパイル使用メモリ 203,832 KB
実行使用メモリ 7,424 KB
最終ジャッジ日時 2024-04-30 05:43:54
合計ジャッジ時間 19,631 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 211 ms
6,944 KB
testcase_02 AC 4 ms
6,940 KB
testcase_03 AC 78 ms
6,940 KB
testcase_04 AC 410 ms
6,940 KB
testcase_05 AC 262 ms
6,944 KB
testcase_06 AC 514 ms
7,296 KB
testcase_07 AC 519 ms
7,424 KB
testcase_08 AC 515 ms
7,296 KB
testcase_09 AC 510 ms
7,296 KB
testcase_10 AC 521 ms
7,424 KB
testcase_11 AC 517 ms
7,296 KB
testcase_12 AC 518 ms
7,296 KB
testcase_13 AC 518 ms
7,296 KB
testcase_14 AC 513 ms
7,296 KB
testcase_15 AC 512 ms
7,296 KB
testcase_16 AC 517 ms
7,296 KB
testcase_17 AC 514 ms
7,296 KB
testcase_18 AC 515 ms
7,296 KB
testcase_19 AC 508 ms
7,424 KB
testcase_20 AC 518 ms
7,168 KB
testcase_21 AC 513 ms
7,296 KB
testcase_22 AC 508 ms
7,296 KB
testcase_23 AC 513 ms
7,424 KB
testcase_24 AC 511 ms
7,296 KB
testcase_25 AC 511 ms
7,296 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 2 ms
6,944 KB
testcase_33 AC 206 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using T = tuple<ll, ll, ll>;
// #include <atcoder/all>
// using namespace atcoder;
// using mint = modint1000000007;
#define rep(i, n) for(ll i = 0; i < n; i++)

int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);

    cout << setprecision(10) << fixed;
    
    ll n; cin >> n;
    vector<double> a(n), b(n);
    rep(i,n) cin >> a[i] >> b[i];
    rep(i,n) {
        ll left = 1, right = 1e16;
        while( right-left > 1 ) {
            ll mid = (right+left)/2;
            bool f = ( sqrt(a[i])+sqrt(b[i]) < mid);
            if( f ) right = mid;
            else left = mid;
        }
        cout << right << endl;
    }
    
    return 0;
}
0