結果
問題 | No.138 化石のバージョン |
ユーザー |
|
提出日時 | 2015-01-28 21:33:55 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 293 bytes |
コンパイル時間 | 1,365 ms |
コンパイル使用メモリ | 160,984 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-29 12:48:08 |
合計ジャッジ時間 | 2,612 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d.%d.%d", &old[0], &old[1], &old[2]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:8:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d.%d.%d", &now[0], &now[1], &now[2]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){vector<int> old(3), now(3);scanf("%d.%d.%d", &old[0], &old[1], &old[2]);scanf("%d.%d.%d", &now[0], &now[1], &now[2]);if(now <= old){cout << "YES" << endl;} else {cout << "NO" << endl;}return 0;}