結果

問題 No.197 手品
ユーザー 184184
提出日時 2015-04-28 23:54:33
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 631 bytes
コンパイル時間 469 ms
コンパイル使用メモリ 55,060 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-09 14:26:34
合計ジャッジ時間 2,028 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
4,376 KB
testcase_15 WA -
testcase_16 AC 2 ms
4,380 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 1 ms
4,380 KB
testcase_23 AC 1 ms
4,376 KB
testcase_24 AC 2 ms
4,384 KB
testcase_25 WA -
testcase_26 AC 1 ms
4,380 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 1 ms
4,376 KB
testcase_32 AC 1 ms
4,380 KB
testcase_33 WA -
testcase_34 AC 2 ms
4,380 KB
testcase_35 WA -
testcase_36 AC 2 ms
4,380 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 1 ms
4,380 KB
testcase_44 WA -
testcase_45 AC 1 ms
4,380 KB
testcase_46 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <map>


using namespace std;

int main(){ 
	char s1[10],s2[10];int n;scanf("%s%d%s",s1,&n,s2);
	int cnt1=0,cnt2=0;
	int dcnt=0;
	for(int i=0;i<3;i++){
		if(s1[i]=='o')cnt1++;
		if(s2[i]=='o')cnt2++;
		if(s1[i]!=s2[i])dcnt++;
	}
	if(cnt1!=cnt2)printf("SUCCESS\n");
	else if(dcnt==0){
		if(n%2==0)printf("FAILURE\n");
		else printf("SUCCESS\n");
	}
	else if(dcnt==2){
		if(s2[0]!=s2[2]){
			if(n%2==0)printf("SUCCESS\n");
			else printf("FAILURE\n");
		}
		else{
			if(n>1)printf("FAILURE\n");
			else printf("SUCCESS\n");
		}
	}
	//printf("%d\n",ans); 
	return 0;
}
0