結果
問題 | No.138 化石のバージョン |
ユーザー |
|
提出日時 | 2017-08-25 10:59:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 274 bytes |
コンパイル時間 | 466 ms |
コンパイル使用メモリ | 54,892 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-15 15:35:57 |
合計ジャッジ時間 | 1,709 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 14 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d.%d.%d", a, a + 1, a + 2); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d.%d.%d", b, b + 1, b + 2); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream> using namespace std; int main() { int a[3], b[3]; scanf("%d.%d.%d", a, a + 1, a + 2); scanf("%d.%d.%d", b, b + 1, b + 2); for (int i = 0; i < 3; i++) if (a[i] < b[i]) { cout << "NO" << endl; return 0; } cout << "YES" << endl; return 0; }