結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2019-05-08 14:34:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 422 bytes |
コンパイル時間 | 1,285 ms |
コンパイル使用メモリ | 159,348 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-02 00:27:27 |
合計ジャッジ時間 | 2,360 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:21:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 21 | scanf("%d.%d.%d",&a[0],&a[1],&a[2]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 22 | scanf("%d.%d.%d",&b[0],&b[1],&b[2]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h> using namespace std; const long long INF = 1LL << 60; #define MOD 1000000007; typedef long long ll; #define writeln(n) cout<<n<<endl; typedef pair<float, float> P; typedef pair<string, int> Psi; vector<int> a(3); vector<int> b(3); int main() { ; scanf("%d.%d.%d",&a[0],&a[1],&a[2]); scanf("%d.%d.%d",&b[0],&b[1],&b[2]); if(b<=a){ writeln("YES"); }else { writeln("NO"); } }