結果

問題 No.431 死亡フラグ
ユーザー elphe
提出日時 2025-09-22 22:02:41
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 492 bytes
コンパイル時間 2,892 ms
コンパイル使用メモリ 275,648 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-09-22 22:02:52
合計ジャッジ時間 3,526 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

[[nodiscard]] static inline constexpr const char* solve(const std::array<uint_fast32_t, 3>& D, const uint_fast32_t S) noexcept
{
	if (S == 1 || std::accumulate(D.begin(), D.end(), UINT32_C(0)) < 2)
		return "SURVIVED";
	else
		return "DEAD";
}

int main()
{
	std::cin.tie(nullptr);
	std::ios::sync_with_stdio(false);

	std::array<uint_fast32_t, 3> D = { 0, };
	uint_fast32_t S;
	std::cin >> D[0] >> D[1] >> D[2] >> S;

	std::cout << solve(D, S) << '\n';
	return 0;
}
0