結果
| 問題 | 
                            No.138 化石のバージョン
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mannshi222
                         | 
                    
| 提出日時 | 2022-04-28 23:59:25 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 526 bytes | 
| コンパイル時間 | 685 ms | 
| コンパイル使用メモリ | 66,956 KB | 
| 最終ジャッジ日時 | 2025-01-28 22:14:42 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / 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\n", &A0, &B0, &C0 );
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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\n", &A1, &B1, &C1 );
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <iostream>
using namespace std;
int main()
{
	int A0, B0, C0;
	int A1, B1, C1;
	
	scanf( "%d.%d.%d\n", &A0, &B0, &C0 );
	scanf( "%d.%d.%d\n", &A1, &B1, &C1 );
	
	if( A0 > A1 ) {
		cout << "YES" << endl;
		return 0;
	}
	if( A0 < A1 ) {
		cout << "NO" << endl;
		return 0;
	}
	if( B0 > B1 ) {
		cout << "YES" << endl;
		return 0;
	}
	if( B0 < B1 ) {
		cout << "NO" << endl;
		return 0;
	}
	if( C0 >= C1 ) {
		cout << "YES" << endl;
		return 0;
	}
	if( C0 < C1 ) {
		cout << "NO" << endl;
		return 0;
	}
	return 0;
}
            
            
            
        
            
mannshi222