結果

問題 No.138 化石のバージョン
ユーザー 👑tozangezan
提出日時 2015-02-22 16:36:15
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 207 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 33,492 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 13:05:26
合計ジャッジ時間 1,488 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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",&a,&b,&c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%d.%d.%d",&d,&e,&f);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<algorithm>
int main(){
	int a,b,c,d,e,f;
	scanf("%d.%d.%d",&a,&b,&c);
	scanf("%d.%d.%d",&d,&e,&f);
	if(d<a||(d==a&&e<b)||(d==a&&e==b&&f<=c))printf("YES\n");
	else printf("NO\n");
}
0