結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2015-01-29 23:23:26 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 861 bytes |
コンパイル時間 | 931 ms |
コンパイル使用メモリ | 86,528 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 12:50:09 |
合計ジャッジ時間 | 2,263 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:37:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 37 | scanf("%d.%d.%d", &v1[0], &v1[1], &v1[2]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:38:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 38 | scanf("%d.%d.%d", &v2[0], &v2[1], &v2[2]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#define _USE_MATH_DEFINES #include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <cfloat> #include <climits> #include <cstring> #include <cmath> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> i_i; typedef pair<ll, int> ll_i; typedef pair<double, int> d_i; typedef pair<ll, ll> ll_ll; typedef pair<double, double> d_d; struct edge { ll B, T, F, P; }; ll MOD = 1234567891; ll _MOD = 1000000009; double EPS = 1e-10; int INF = INT_MAX / 10; int main() { 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]); cout << (v1 >= v2 ? "YES" : "NO") << endl; }