結果

問題 No.201 yukicoderじゃんけん
ユーザー tubo28tubo28
提出日時 2015-05-03 23:26:04
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 1,620 bytes
コンパイル時間 587 ms
コンパイル使用メモリ 71,732 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-19 03:57:46
合計ジャッジ時間 1,700 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,504 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,384 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
#define loop(i,a,b) for(int i=(a);i<int(b);i++)
#define rep(i,b) loop(i,0,b)
#define all(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;

//#define int ll
//#define endl "\n"

template<typename Type, unsigned N, unsigned Last>
struct tuple_printer
{
    static void print(std::ostream& out, const Type& value)
    {
        out << std::get<N>(value) << ", ";
        tuple_printer<Type, N + 1, Last>::print(out, value);
    }
};
template<typename Type, unsigned N>
struct tuple_printer < Type, N, N >
{
    static void print(std::ostream& out, const Type& value)
    {
        out << std::get<N>(value);
    }
};
template<typename... Types>
std::ostream& operator<<(std::ostream& out, const std::tuple<Types...>& value)
{
    out << "(";
    tuple_printer<std::tuple<Types...>, 0, sizeof...(Types)-1>::print(out, value);
    out << ")";
    return out;
}

#ifdef DEBUG
#define dump(...) (cerr << #__VA_ARGS__ << " = " << make_tuple(__VA_ARGS__) << " [" << __LINE__ << "]" << endl)
#else
#define dump(...)
#endif

signed main()
{
    string a, aa;
    string b, bb;
    string c, cc;
    cin >> a >> b >> c;
    cin >> aa >> bb >> cc;
    int ans = -1;
    while (b.size() > bb.size()) bb = "0" + bb;
    while (b.size() < bb.size()) b = "0" + b;
    if (b == bb)
    {
        cout << -1;
    }
    else if(b > bb)
    {
        cout << a;
    }
    else
    {
        cout << aa;
    }
    cout << endl;
}
0