結果
| 問題 |
No.431 死亡フラグ
|
| コンテスト | |
| ユーザー |
moyashi_senpai
|
| 提出日時 | 2016-10-14 22:23:59 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 718 bytes |
| コンパイル時間 | 572 ms |
| コンパイル使用メモリ | 78,528 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-22 07:06:52 |
| 合計ジャッジ時間 | 1,262 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 3 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:29:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
29 | scanf("%d", &a);
| ~~~~~^~~~~~~~~~
main.cpp:33:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
33 | scanf("%d", &s);
| ~~~~~^~~~~~~~~~
main.cpp:30:19: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized]
30 | c += a;
| ~~^~~~
ソースコード
#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#define rep(i,s,n) for(int i = (s); (n) > i; i++)
#define REP(i,n) rep(i,0,n)
#define RANGE(x,a,b) ((a) <= (x) && (x) <= (b))
#define POWT(x) ((x)*(x))
#define ALL(x) (x).begin(), (x).end()
#define MOD 1000000007
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
int main() {
int c;
REP(i, 3) {
int a;
scanf("%d", &a);
c += a;
}
int s;
scanf("%d", &s);
if (!s && c >= 2) printf("DEAD\n");
else printf("SURVIVED\n");
return 0;
}
moyashi_senpai