結果
| 問題 | 
                            No.201 yukicoderじゃんけん
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Drafear
                         | 
                    
| 提出日時 | 2016-02-04 11:41:38 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 1,343 bytes | 
| コンパイル時間 | 1,365 ms | 
| コンパイル使用メモリ | 160,012 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-21 20:16:31 | 
| 合計ジャッジ時間 | 2,080 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 20 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;
#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()
const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);
template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
	EACH(x,vec) is >> x;
	return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
	REP(i,vec.size()) {
		if (i) os << " ";
		os << vec[i];
	}
	return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
	REP(i,vec.size()) {
		if (i) os << endl;
		os << vec[i];
	}
	return os;
}
bool gt(string a, string b) {
	if (a.size() != b.size()) return a.size() > b.size();
	return a > b;
}
int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	string A, B; string a, b; string x, y; cin >> A >> a >> x >> B >> b >> y;
	if ( gt(a, b) ) {
		cout << A << endl;
	}
	else if ( gt(b, a) ) {
		cout << B << endl;
	}
	else {
		cout << -1 << endl;
	}
}
            
            
            
        
            
Drafear