結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-12 00:40:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 554 bytes |
| コンパイル時間 | 1,506 ms |
| コンパイル使用メモリ | 159,704 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-28 09:24:03 |
| 合計ジャッジ時間 | 2,491 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 33 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
string in1,in2;
int v1,v2;
int p1=0, p2=0;
cin >> in1;
cin >> in2;
for(int i=0; i<3 ;i++){
v1 = stoi(in1.substr(p1,in1.find('.', p1+1)-p1));
v2 = stoi(in2.substr(p2,in2.find('.', p2+1)-p2));
cout << v1 << "*" << v2 << endl;
if(v1>v2 || (v1==v2 && i==2)){
cout << "YES" <<endl;
return 0;
}
p1 = in1.find('.', p1)+1;
p2 = in2.find('.', p2)+1;
}
cout << "NO" << endl;
return 0;
}