結果

問題 No.1010 折って重ねて
ユーザー milanis48663220milanis48663220
提出日時 2020-03-20 21:33:01
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 931 bytes
コンパイル時間 784 ms
コンパイル使用メモリ 82,208 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-08 21:00:26
合計ジャッジ時間 10,100 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 168 ms
5,248 KB
testcase_01 AC 175 ms
5,248 KB
testcase_02 AC 173 ms
5,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 186 ms
5,376 KB
testcase_06 AC 183 ms
5,376 KB
testcase_07 AC 191 ms
5,376 KB
testcase_08 AC 189 ms
5,376 KB
testcase_09 AC 192 ms
5,376 KB
testcase_10 AC 182 ms
5,376 KB
testcase_11 AC 179 ms
5,376 KB
testcase_12 AC 193 ms
5,376 KB
testcase_13 AC 191 ms
5,376 KB
testcase_14 AC 182 ms
5,376 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 167 ms
5,376 KB
testcase_20 WA -
testcase_21 AC 166 ms
5,376 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 164 ms
5,376 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 163 ms
5,376 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 171 ms
5,376 KB
testcase_35 AC 175 ms
5,376 KB
testcase_36 AC 175 ms
5,376 KB
testcase_37 AC 177 ms
5,376 KB
testcase_38 WA -
testcase_39 AC 178 ms
5,376 KB
testcase_40 WA -
testcase_41 AC 166 ms
5,376 KB
testcase_42 AC 165 ms
5,376 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 172 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>
#include <map>

using namespace std;
typedef long long ll;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << setprecision(10) << fixed;
    double x, y, h;
    cin >> x >> y >> h;
    x *= 1000;
    y *= 1000;
    int ans = 0;
    for(int i = 0; i < (1<<21); i++){
        int cnt = 0;
        double H = h;
        double X = x;
        double Y = y;
        for(int j = 0; j <= 21; j++){
            int m = 1<<j;
            if(m&i){
                if(X > H){
                    cnt++;
                    H *= 2;
                    X /= 2;
                }
            }else{
                if(Y > H){
                    cnt++;
                    H *= 2;
                    Y /= 2;
                }
            }
        }
        ans = max(ans, cnt);
    }
    cout << ans << endl;
}
0