結果
問題 | No.431 死亡フラグ |
ユーザー |
![]() |
提出日時 | 2017-05-04 08:29:06 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 452 bytes |
コンパイル時間 | 1,997 ms |
コンパイル使用メモリ | 191,780 KB |
最終ジャッジ日時 | 2025-01-03 22:15:22 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:17:23: warning: ‘d’ is used uninitialized [-Wuninitialized] 17 | rep(i,3) {cin>>a;d+=a;} | ~^~~ main.cpp:16:9: note: ‘d’ was declared here 16 | int d,s,a; | ^
ソースコード
#include <bits/stdc++.h>#define re(i,j,n) for(li i=(j);i<(n);i++)#define rep(i,n) re(i,0,(n))#define all(a) begin(a),end(a)#define pb push_backusing namespace std;typedef long int li;typedef unsigned long long ull;typedef vector<int> vi;typedef vector<li> vli;typedef vector<string> vs;int main(){int d,s,a;rep(i,3) {cin>>a;d+=a;}cin>>s;if(d<2||s) cout<<"SURVIVED\n";else cout<< "DEAD\n";return 0;}