結果

問題 No.381 名声値を稼ごう Extra
ユーザー uw_yu1rabbituw_yu1rabbit
提出日時 2021-04-03 00:40:45
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 346 bytes
コンパイル時間 4,725 ms
コンパイル使用メモリ 381,276 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-08-25 15:08:27
合計ジャッジ時間 14,903 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:6:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    6 | main(){
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
namespace mp = boost::multiprecision;
main(){
 mp::cpp_int x;
 cin >> x;
 mp::cpp_int ans = 0, t = 0;
 while (x){
     t += x;
      if(ans < t + x) {
          ans = t + x;
      }
      x /= 2;
 }
  if(ans <t) {ans = t;}
  cout<<ans<<endl;
}
0