結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-12 17:24:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 395 bytes |
| コンパイル時間 | 1,491 ms |
| コンパイル使用メモリ | 157,416 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 14:30:39 |
| 合計ジャッジ時間 | 2,355 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d.%d.%d", &a0, &b0, &c0);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%d.%d.%d", &a1, &b1, &c1);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int a0, b0, c0, a1, b1, c1;
scanf("%d.%d.%d", &a0, &b0, &c0);
scanf("%d.%d.%d", &a1, &b1, &c1);
ll x0 = a0 * 1000000 + b0 * 1000 + c0;
ll x1 = a1 * 1000000 + b1 * 1000 + c1;
if (x1 <= x0) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}