// No.431 死亡フラグ // https://yukicoder.me/problems/no/431 // #include #include #include #include using namespace std; string solve(vector &dead_flags, int survive_flag); int main() { vector dead_flags(3); int survive_flag; for (auto i = 0; i < 3; i++) cin >> dead_flags[i]; cin >> survive_flag; string ans = solve(dead_flags, survive_flag); cout << ans << endl; } string solve(vector &dead_flags, int survive_flag) { if (survive_flag) return "SURVIVED"; int dead_total = accumulate(dead_flags.begin(), dead_flags.end(), 0); if (dead_total >= 2) return "DEAD"; return "SURVIVED"; }