結果

問題 No.138 化石のバージョン
ユーザー 184
提出日時 2015-01-29 23:32:04
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 354 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 34,048 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 04:09:35
合計ジャッジ時間 1,368 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 13 WA * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:28: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |         int a[3],b[3];scanf("%d.%d.%d%d.%d.%d",&a[0],&a[1],&a[2],&b[0],&b[1],&b[2]);
      |                       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <cstdlib> 
#include <algorithm>
 
using namespace std;

//namaega184


int main(){
	int a[3],b[3];scanf("%d.%d.%d%d.%d.%d",&a[0],&a[1],&a[2],&b[0],&b[1],&b[2]);
	long long v1=a[0]+a[1]*1000+a[2]*1000000;
	long long v2=b[0]+b[1]*1000+b[2]*1000000;
	if(v1<v2)printf("NO\n");
	else printf("YES\n");
	return 0;
}
0