結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
hotpepsi
|
| 提出日時 | 2015-02-01 19:59:23 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 545 bytes |
| コンパイル時間 | 677 ms |
| コンパイル使用メモリ | 59,128 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-23 05:26:36 |
| 合計ジャッジ時間 | 1,625 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 4 |
ソースコード
#include <iostream>
#include <algorithm>
#include <sstream>
#include <cstdio>
using namespace std;
int main(int argc, char *argv[])
{
int N, K;
string s;
getline(cin, s);
int a, b, c;
sscanf(s.c_str(), "%d.%d.%d", &a, &b, &c);
getline(cin, s);
int d, e, f;
sscanf(s.c_str(), "%d.%d.%d", &d, &e, &f);
bool old = false;
if (d < a) {
old = true;
} else if (d == a) {
if (e < b) {
old = true;
} else if (e == b) {
if (f < c) {
old = true;
}
}
}
string ans = old ? "YES" : "NO";
cout << ans << endl;
return 0;
}
hotpepsi