結果
問題 |
No.138 化石のバージョン
|
ユーザー |
|
提出日時 | 2017-05-03 06:57:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 493 bytes |
コンパイル時間 | 497 ms |
コンパイル使用メモリ | 57,776 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 05:11:24 |
合計ジャッジ時間 | 1,631 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 14 |
ソースコード
#include <iostream> #include <sstream> using namespace std; int main(int argc, const char* argv[]) { string ver1, ver2; cin >> ver1 >> ver2; for (auto&& c : ver1) if (c == '.') c = ' '; for (auto&& c : ver2) if (c == '.') c = ' '; stringstream s; s << ver1 << endl << ver2; int A[3], B[3]; for (auto&& a : A) s >> a; for (auto&& b : B) s >> b; for (int i = 0; i < 3; i++) { if (A[i] < B[i]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }