結果
| 問題 | 
                            No.138 化石のバージョン
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-07-26 19:27:29 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 3 ms / 5,000 ms | 
| コード長 | 297 bytes | 
| コンパイル時間 | 1,687 ms | 
| コンパイル使用メモリ | 192,516 KB | 
| 最終ジャッジ日時 | 2025-01-07 07:36:56 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 33 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |     scanf("%d.%d.%d", &a, &b, &c);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |     scanf("%d.%d.%d", &d, &e, &f);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
    int a, b, c, d, e, f;
    scanf("%d.%d.%d", &a, &b, &c);
    scanf("%d.%d.%d", &d, &e, &f);
    int g = a*1e6+b*1e3+c;
    int h = d*1e6+e*1e3+f;
    if (g >= h) puts("YES");
    else puts("NO");
    return 0;
}