結果

問題 No.2233 Average
ユーザー ripityripity
提出日時 2023-03-03 21:39:59
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 170 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 4,438 ms
コンパイル使用メモリ 216,648 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-18 01:36:45
合計ジャッジ時間 6,379 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 101 ms
4,348 KB
testcase_09 AC 150 ms
4,348 KB
testcase_10 AC 90 ms
4,348 KB
testcase_11 AC 88 ms
4,348 KB
testcase_12 AC 76 ms
4,348 KB
testcase_13 AC 19 ms
4,348 KB
testcase_14 AC 84 ms
4,348 KB
testcase_15 AC 114 ms
4,348 KB
testcase_16 AC 33 ms
4,348 KB
testcase_17 AC 43 ms
4,348 KB
testcase_18 AC 170 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
void solve() {
	long long a, b, c, K;
	cin >> a >> b >> c >> K;
	for( long long i = 1; i <= min(100LL, K); i++ ) {
		long long a_ = (b+c)>>1, b_ = (c+a)>>1, c_ = (a+b)>>1;
		a = a_, b = b_, c = c_;
	}
	cout << a+b+c << endl;
}
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int T;
	cin >> T;
	while(T--) {
		solve();
	}
}
0