結果

問題 No.1010 折って重ねて
ユーザー tkmst201tkmst201
提出日時 2020-12-02 15:13:28
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 875 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 199,120 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-10-11 11:27:13
合計ジャッジ時間 4,292 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,352 KB
testcase_06 AC 2 ms
4,352 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 1 ms
4,356 KB
testcase_11 AC 1 ms
4,352 KB
testcase_12 WA -
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 1 ms
4,352 KB
testcase_16 AC 1 ms
4,352 KB
testcase_17 AC 2 ms
4,352 KB
testcase_18 AC 1 ms
4,352 KB
testcase_19 WA -
testcase_20 AC 1 ms
4,352 KB
testcase_21 AC 1 ms
4,348 KB
testcase_22 WA -
testcase_23 AC 1 ms
4,356 KB
testcase_24 AC 1 ms
4,352 KB
testcase_25 AC 2 ms
4,348 KB
testcase_26 WA -
testcase_27 AC 2 ms
4,352 KB
testcase_28 WA -
testcase_29 AC 1 ms
4,348 KB
testcase_30 AC 2 ms
4,356 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 2 ms
4,352 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 1 ms
4,352 KB
testcase_43 AC 2 ms
4,352 KB
testcase_44 AC 2 ms
4,348 KB
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) begin(v),end(v)
template<typename A, typename B> inline bool chmax(A & a, const B & b) { if (a < b) { a = b; return true; } return false; }
template<typename A, typename B> inline bool chmin(A & a, const B & b) { if (a > b) { a = b; return true; } return false; }
using ll = long long;
using pii = pair<int, int>;
constexpr ll INF = 1ll<<30;
constexpr ll longINF = 1ll<<60;
constexpr ll MOD = 1000000007;
constexpr bool debug = false;
//---------------------------------//

int main() {
	ll X, Y, H;
	cin >> X >> Y >> H;
	if (X < Y) swap(X, Y);
	X *= 1000;
	Y *= 1000;
	int x = 0, y = 0;
	while (X > H || Y > H) {
		if (X > H) ++x;
		if (Y > H) ++y;
		H <<= 1;
	}
	int cx = (x + 1) / 2;
	int cy = (y - cx + 1) / 2;
	cout << cx + cy << endl;
}
0