結果
| 問題 |
No.381 名声値を稼ごう Extra
|
| コンテスト | |
| ユーザー |
uw_yu1rabbit
|
| 提出日時 | 2021-04-03 00:40:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 346 bytes |
| コンパイル時間 | 7,350 ms |
| コンパイル使用メモリ | 339,008 KB |
| 最終ジャッジ日時 | 2025-01-20 10:14:21 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 TLE * 1 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
6 | main(){
| ^~~~
ソースコード
#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;
}
uw_yu1rabbit