結果
| 問題 | 
                            No.138 化石のバージョン
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2015-01-29 23:34:24 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 386 bytes | 
| コンパイル時間 | 708 ms | 
| コンパイル使用メモリ | 58,832 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-23 04:10:10 | 
| 合計ジャッジ時間 | 1,730 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 3 | 
| other | WA * 33 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |         scanf("%d.%d.%d", &a, &b, &c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   13 |         scanf("%d.%d.%d", &d, &e, &f);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
int main() {
	int a, b, c, d, e, f;
	scanf("%d.%d.%d", &a, &b, &c);
	scanf("%d.%d.%d", &d, &e, &f);
	int x = a * 1000000 + b * 1000 + c;
	int y = d * 1000000 + e * 1000 + f;
	printf("%10d\n%10d\n", x, y);
	cout << (y - x > 0 ? "NO" : "YES") << endl;
	return 0;
}