結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2015-05-31 15:49:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 446 bytes |
コンパイル時間 | 489 ms |
コンパイル使用メモリ | 57,432 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 12:59:37 |
合計ジャッジ時間 | 1,233 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 WA * 7 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(){ string ostr,nstr; string old = "",noww =""; cin >> ostr; cin >> nstr; int j=2; for(int i=0 ;i< ostr.size();i++){ if(ostr[i] == '.'){ j--; }else{ old += ostr[i]; } } for(int i=0 ;i< nstr.size();i++){ if(nstr[i] == '.'){ j--; }else{ noww += nstr[i]; } } if(old >= noww){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }