結果

問題 No.138 化石のバージョン
ユーザー ふう
提出日時 2015-01-31 00:20:13
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 515 bytes
コンパイル時間 947 ms
コンパイル使用メモリ 84,004 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 12:59:35
合計ジャッジ時間 2,158 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   22 |         scanf("%d.%d.%d", &v1[0], &v1[1], &v1[2]);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:24:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   24 |         scanf("%d.%d.%d", &v2[0], &v2[1], &v2[2]);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <map>
#include <list>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <iomanip>

using namespace std;

int main(void)
{
	vector<int> v1(3), v2(3);

	scanf("%d.%d.%d", &v1[0], &v1[1], &v1[2]);

	scanf("%d.%d.%d", &v2[0], &v2[1], &v2[2]);

	if(v1 >= v2) cout << "YES" << endl;
	else		 cout << "NO" << endl;

	return (0);
}
0