結果

問題 No.2233 Average
ユーザー ripityripity
提出日時 2023-03-03 21:39:59
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 178 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 2,828 ms
コンパイル使用メモリ 217,000 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-17 22:34:12
合計ジャッジ時間 5,070 ms
ジャッジサーバーID
(参考情報)
judge6 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

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