結果
問題 | No.201 yukicoderじゃんけん |
ユーザー |
![]() |
提出日時 | 2016-09-23 18:53:57 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 763 bytes |
コンパイル時間 | 900 ms |
コンパイル使用メモリ | 70,880 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 19:37:26 |
合計ジャッジ時間 | 1,556 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include<stdio.h>#include <vector>#include <list>#include <map>#include <set>#include <queue>#include <stack>#include <algorithm>#include <sstream>#include <iostream>#include <string>#include <stdio.h>using namespace std;int main() {string s[2],t;string a[2];for (int i = 0; i < 2; i++) {cin >> s[i] >> a[i] >> t;}string win = "-1";int i=0;bool flag = true;if (a[0].size() > a[1].size()) {flag = false;win = s[0];}else if (a[0].size() < a[1].size()) {flag = false;win = s[1];}while (flag) {if (a[0][i] > a[1][i]) {flag = false;win = s[0];}else if (a[0][i] < a[1][i]) {flag = false;win = s[1];}if (i == a[0].size()) {break;}i++;}cout << win << endl;return 0;}