結果
問題 |
No.98 円を描こう
|
ユーザー |
|
提出日時 | 2020-02-04 21:00:00 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 333 bytes |
コンパイル時間 | 556 ms |
コンパイル使用メモリ | 66,564 KB |
最終ジャッジ日時 | 2025-01-08 22:07:25 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
#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<< std::endl; return 0; }