結果

問題 No.138 化石のバージョン
ユーザー nanophoto12nanophoto12
提出日時 2016-01-09 00:09:59
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 1,267 bytes
コンパイル時間 651 ms
コンパイル使用メモリ 87,552 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 16:52:07
合計ジャッジ時間 5,111 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 RE -
testcase_19 AC 2 ms
4,348 KB
testcase_20 RE -
testcase_21 AC 2 ms
4,348 KB
testcase_22 RE -
testcase_23 AC 2 ms
4,348 KB
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <limits>

using namespace std;

#define FOR(x,y) for(int x = 0;x < (y);x++)
#define LLI long long int
#define FORR(x,arr) for(auto& x:arr)
#define ALL(a) (a.begin()),(a.end())

#define _L(x) cout<<(x)<<endl

struct Element{
    LLI Value;
    vector<int> R;
};

vector<int> ToNumeric(string text)
{
    vector<int> v(3);
    int j = 0;
    for(int i = 0;i < text.length();i++)
    {
        if(text[i] == '.')
        {
            j++;
        }
        else
        {
            v[i] *= 10;
            v[i] += text[i]-'0';
        }
    }
    return v;
}

int main()
{
    string source, target;
    cin >> source;
    cin >> target;
    
    auto sourceN = ToNumeric(source);
    auto targetN =ToNumeric(target);
    for(int i = 0;i < 3;i++)
    {
        if(sourceN[i] > targetN[i])
        {
            cout << "YES" << endl;
            return 0;
        }
        if(sourceN[i] < targetN[i])
        {
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    return 0;
    
    return 0;
}
0