結果
問題 | No.1543 [Cherry 2nd Tune A] これがプログラミングなのね |
ユーザー |
|
提出日時 | 2021-06-11 21:26:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 268 bytes |
コンパイル時間 | 1,718 ms |
コンパイル使用メモリ | 165,308 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-14 22:19:15 |
合計ジャッジ時間 | 2,631 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:19:1: warning: 'flg' may be used uninitialized [-Wmaybe-uninitialized] 19 | if(flg) | ^~ main.cpp:8:6: note: 'flg' was declared here 8 | bool flg; | ^~~
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int S,T; char c; cin >> S >> T >> c ; bool flg; switch(c){ case '<': flg = (S<T); break; case '>': flg = (S>T); break; case '=': flg = (S==T); } if(flg) cout << "YES" << endl; else cout << "NO" << endl; }