結果

問題 No.98 円を描こう
ユーザー Pachicobue
提出日時 2020-02-04 20:59:42
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 1,252 ms
コンパイル使用メモリ 65,792 KB
最終ジャッジ日時 2025-01-08 22:07:21
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 4
other WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
int main()
{
    using ll = long long;
    ll x, y;std::cin >> x >> y;
    x = std::abs(x), y=std::abs(y);
    const ll r = x*x+y*y;
    ll inf = -1, sup = 40000;
    while(sup-inf>1){
        const ll mid = (inf+sup)/2;
        (mid*mid>r*4LL?sup:inf)=mid;
    }
    std::cout << sup*2LL << std::endl;
    return 0;
}
0