結果

問題 No.201 yukicoderじゃんけん
ユーザー koyumeishikoyumeishi
提出日時 2015-03-21 00:23:29
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 902 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 65,984 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-11 09:07:18
合計ジャッジ時間 1,430 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

//入力チェック用

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include "assert.h"

using namespace std;

int main(){
	vector<string> A(3);
	vector<string> B(3);

	cin >> A[0] >> A[1] >> A[2];
	cin >> B[0] >> B[1] >> B[2];


	string zero = "0";
	string ub = "1";
	ub.resize(10000+1, '0');

	int max_len = max(A[1].size(), B[1].size());
	max_len = max(max_len, (int)ub.size());

	auto func = [&](string& s){
		reverse(s.begin(), s.end());
		s.resize(max_len, '0');
		reverse(s.begin(), s.end());
	};

	func(A[1]); func(B[1]);
	func(zero); func(ub);

	assert(1 <= A[0].size() && A[0].size() <= 100);
	assert(zero <= A[1] && A[1] < ub);
	assert(A[2] == "R" || A[2] == "S" || A[2] == "P");

	
	assert(1 <= B[0].size() && B[0].size() <= 100);
	assert(zero <= B[1] && B[1] < ub);
	assert(B[2] == "R" || B[2] == "S" || B[2] == "P");

	assert(A[0] != B[0]);

	return 0;
}
0