結果
問題 | No.431 死亡フラグ |
ユーザー |
![]() |
提出日時 | 2016-10-14 22:39:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 346 bytes |
コンパイル時間 | 1,407 ms |
コンパイル使用メモリ | 159,152 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-22 07:37:07 |
合計ジャッジ時間 | 2,012 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string y = "SURVIVED", n = "DEAD"; unsigned short a, b, c, s; cin >> a >> b >> c >> s; unsigned short t = a + (b<<1) + (c<<2); if (s&1 || __builtin_popcount(t) < 2) { cout << y << endl; } else { cout << n << endl; } return 0; }