結果

問題 No.201 yukicoderじゃんけん
ユーザー koyumeishi
提出日時 2015-03-21 00:23:29
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 902 bytes
コンパイル時間 542 ms
コンパイル使用メモリ 63,900 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 23:48:07
合計ジャッジ時間 1,294 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

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