結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2018-03-13 00:50:06 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 403 bytes |
コンパイル時間 | 441 ms |
コンパイル使用メモリ | 36,428 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-15 21:20:21 |
合計ジャッジ時間 | 1,429 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d.%d.%d", a, b, c); | ~~~~~^~~~~~~~~~~~~~~~~~~~~ main.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d.%d.%d", a + 1, b + 1, c + 1); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>#include <algorithm>#include <deque>using namespace std;using ll = long long;//138int main() {int a[2], b[2], c[2];scanf("%d.%d.%d", a, b, c);scanf("%d.%d.%d", a + 1, b + 1, c + 1);if (a[1] != a[0])printf("%s\n", a[1] < a[0] ? "YES" : "NO");else if (b[1] != b[0])printf("%s\n", b[1] < b[0] ? "YES" : "NO");elseprintf("%s\n", c[1] <= c[0] ? "YES" : "NO");}