結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2021-01-13 21:32:35 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 1,079 bytes |
| コンパイル時間 | 826 ms |
| コンパイル使用メモリ | 93,048 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-22 17:36:44 |
| 合計ジャッジ時間 | 1,650 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<math.h>
#include<iomanip>
#include<stack>
#include<queue>
#include<set>
#include<map>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using P = pair<int , int>;
//const ll mod = 1000000007;
const ll mod = 998244353;
const ld pi = 3.14159265358979;
int f(string s , string t){
if(s == t)return 0;
if(s.size() > t.size())return 1;
else if(s.size() < t.size())return 2;
for(int i = 0; i < s.size(); i++){
int x = s[i] - '0';
int y = t[i] - '0';
//cout << x << " : " << y << endl;
if(x > y)return 1;
else if(x < y)return 2;
}
return 0;
}
int main() {
//ios::sync_with_stdio(false);
//cin.tie(0);
//cout << fixed << setprecision(15);
string s1 , s2 , s3;
string t1 , t2 , t3;
cin >> s1 >> s2 >> s3;
cin >> t1 >> t2 >> t3;
int x = f(s2 , t2);
if(x == 0)cout << -1 << endl;
else if(x == 1)cout << s1 << endl;
else if(x == 2)cout << t1 << endl;
return 0;
}
mmn15277198