結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-29 22:30:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 1,272 bytes |
| コンパイル時間 | 1,555 ms |
| コンパイル使用メモリ | 168,468 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-03 04:39:43 |
| 合計ジャッジ時間 | 2,258 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORTASC(c) sort((c).begin(),(c).end())
#define SORTDESC(c,t) sort((c).begin(),(c).end(), std::greater<t>());
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
const double PI = acos(-1.0);
using ll = long long;
using namespace std;
int main() {
string sa, sb, pa, pb, x, ans = "-1";
cin >> sa >> pa >> x >> sb >> pb;
string zero = "";
if (pa.length() > pb.length()){
for (int i = 0; i < pa.length() - pb.length(); i++) {
zero += "0";
}
pb = zero + pb;
} else {
for (int i = 0; i < pb.length() - pa.length(); i++) {
zero += "0";
}
pa = zero + pa;
}
if (pa > pb)
{
ans = sa;
}
else if (pa < pb)
{
ans = sb;
}
cout << ans << endl;
return 0;
}