結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
dnish
|
| 提出日時 | 2017-01-03 00:21:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 275 bytes |
| コンパイル時間 | 1,428 ms |
| コンパイル使用メモリ | 157,860 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-29 14:15:53 |
| 合計ジャッジ時間 | 2,377 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d.%d.%d",&A,&B,&C);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
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",&a,&b,&c);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,N) for(int i=1;i<N;i++)
int main() {
int A,B,C;
int a,b,c;
scanf("%d.%d.%d",&A,&B,&C);
scanf("%d.%d.%d",&a,&b,&c);
if(A*1000000+B*1000+C>=a*1000000+b*1000+c) printf("YES\n");
else printf("NO\n");
return 0;
}
dnish