結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2025-03-14 10:13:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 422 ms |
コンパイル使用メモリ | 27,136 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-14 10:13:50 |
合計ジャッジ時間 | 1,868 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d.%d.%d%d.%d.%d", &a[0], &b[0], &c[0], &a[1], &b[1], &c[1]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main() { int a[2], b[2], c[2]; scanf("%d.%d.%d%d.%d.%d", &a[0], &b[0], &c[0], &a[1], &b[1], &c[1]); if (a[0] > a[1]){ printf("YES\n"); }else if (a[0] < a[1]){ printf("NO\n"); }else if (b[0] > b[1]){ printf("YES\n"); }else if (b[0] < b[1]){ printf("NO\n"); }else if (c[0] < c[1]){ printf("NO\n"); }else{ printf("YES\n"); return 0; } }