結果
| 問題 |
No.2233 Average
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-28 18:09:30 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 411 bytes |
| コンパイル時間 | 1,785 ms |
| コンパイル使用メモリ | 193,196 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-09-28 18:09:35 |
| 合計ジャッジ時間 | 5,075 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 18 |
コンパイルメッセージ
main.cpp: In function ‘void solve()’:
main.cpp:8:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%lld%lld%lld%lld", &A, &B, &C, &K);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp: In function ‘int main()’:
main.cpp:20:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
20 | scanf("%d", &T);
| ~~~~~^~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int T;
LL A, B, C, K;
void solve()
{
scanf("%lld%lld%lld%lld", &A, &B, &C, &K);
while (K--)
{
LL tA = B + C >> 1, tB = A + C >> 1, tC = A + B >> 1;
A = tA, B = tB, C = tC;
if (A == B && B == C)
break;
}
printf("%lld %lld %lld\n", A, B, C);
}
int main()
{
scanf("%d", &T);
while (T--)
solve();
return 0;
}