結果

問題 No.98 円を描こう
コンテスト
ユーザー Pachicobue
提出日時 2020-02-04 20:52:57
言語 C++17
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 466 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 518 ms
コンパイル使用メモリ 103,112 KB
実行使用メモリ 9,932 KB
最終ジャッジ日時 2026-10-25 07:15:23
合計ジャッジ時間 2,871 ms
ジャッジサーバーID
(参考情報)
judge7_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 4
other WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <iomanip>
#include <cmath>
int main()
{
    int x, y;std::cin >> x >> y;
    x = std::abs(x), y=std::abs(y);
    const int R = x*x+y*y;
    int min = 1<<30;
    for(int i =0; i <= 2*x; i++){
        for(int j =0; j <=2*y; j++){
            const int r = i*i+j*j;
            if(r>R){min = std::min(min, r);}
        }
    }
    std::cout << std::fixed << std::setprecision(15)<< std::sqrt((long double)(min))<< std::endl;
    return 0;
}
0