結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
Yang33
|
| 提出日時 | 2016-01-04 23:05:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 296 bytes |
| コンパイル時間 | 460 ms |
| コンパイル使用メモリ | 55,584 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 13:45:31 |
| 合計ジャッジ時間 | 1,670 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d.%d.%d %d.%d.%d", &a1, &b1, &c1, &a2, &b2, &c2);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<iostream>
using namespace std;
int main(void)
{
int a1, b1, c1, a2, b2, c2;
scanf("%d.%d.%d %d.%d.%d", &a1, &b1, &c1, &a2, &b2, &c2);
if (a1 > a2 || a1 == a2&&b1 > b2 || a1 == a2&&b1 == b2&&c1 >= c2)
cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
Yang33