提出 #1535498
ソースコード 拡げる
#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string s1, s2 , s3;
cin >> s1 >> s2 >> s3;
int ind1 = 0, ind2 = 0, ind3 = 0, cur = 0;
while (true) {
int aux;
if (cur == 0) {
if (ind1 == s1.size()) {
cout << "A\n";
return 0;
}
aux = s1[ind1++]-'a';
} else if (cur == 1) {
if (ind2 == s2.size()) {
cout << "B\n";
return 0;
}
aux = s2[ind2++]-'a';
} else {
if (ind3 == s3.size()) {
cout << "C\n";
return 0;
}
aux = s3[ind3++]-'a';
}
cur = aux;
}
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - 3人でカードゲームイージー |
| ユーザ | Quinas |
| 言語 | C++14 (GCC 5.4.1) |
| 得点 | 200 |
| コード長 | 1009 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 256 KiB |
ジャッジ結果
| セット名 | Sample | All | ||
|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||
| 結果 | AC |
|
| セット名 | テストケース |
|---|---|
| Sample | |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample_01.txt, sample_02.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01.txt | AC | 1 ms | 256 KiB |
| 02.txt | AC | 1 ms | 256 KiB |
| 03.txt | AC | 1 ms | 256 KiB |
| 04.txt | AC | 1 ms | 256 KiB |
| 05.txt | AC | 1 ms | 256 KiB |
| 06.txt | AC | 1 ms | 256 KiB |
| 07.txt | AC | 1 ms | 256 KiB |
| 08.txt | AC | 1 ms | 256 KiB |
| 09.txt | AC | 1 ms | 256 KiB |
| 10.txt | AC | 1 ms | 256 KiB |
| sample_01.txt | AC | 1 ms | 256 KiB |
| sample_02.txt | AC | 1 ms | 256 KiB |