結果

問題 No.486 3 Straight Win(3連勝)
ユーザー qqqqqqqq
提出日時 2017-04-27 14:12:28
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 2,717 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 25,272 KB
実行使用メモリ 7,064 KB
最終ジャッジ日時 2023-10-11 16:03:13
合計ジャッジ時間 4,281 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 1 ms
4,352 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 2 ms
4,352 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,352 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #


#include <stdio.h>

#define NUMBER 80

void end(void) {
	printf("end");
	while (1);
	return;
}

int main(void)
{
	/*int i;
	int x[NUMBER];

	for ( i = 0; i < NUMBER; i++)
	{
		printf("x[%2d] : ", i);
		scanf_s("%2d", &x[i]);

	}

	for (i = 0; i < NUMBER; i++)

		printf("x[%2d]=%d\n", i, x[i]);

	int i, j, k, l, m, n;
	int num;
	int tensu[NUMBER];
	int bunpu[11] = { 0 };

	printf("人数を入力してください:");

	do
	{
		scanf_s("%d", &num);
		if (num < 1 || num > NUMBER)
		printf("\a1~%dで入力してください:", NUMBER);
	} while (num < 1 || num > NUMBER);

	printf("%d人の点数を入力してください。\n", num);

	for ( i = 0; i < num; i++)
	{
		printf("%2d番:", i + 1);
		do
		{
			scanf_s("%d", &tensu[i]);
			if (tensu[i] < 0 || tensu[i]>100)
			printf("\a0~100で入力してください:");
		} while (tensu[i] < 0 || tensu[i]>100);
		bunpu[tensu[i] / 10]++;

	}

	puts("\n---分布グラフ---");

	for (i = 0; i <= 9; i = i + 1)
	{
		printf("%3d~%3d:", i * 10, i * 10 + 9);
		for (j = 0; j < bunpu[i]; j++)
			putchar('*');
		putchar('\n');
	}
		printf("      100:");

	for (j = 0; j < bunpu[10]; j++)
	{
		putchar('*');
		putchar('\n');
	}*/

	/*int gyort1[3][4];
	int gyort2[4][3];
	int sum[4][4];

	printf("行列1を入力してください\n");
	for (i = 0; i < 4; i++)
	{
		for (j = 0; j < 3; j = j + 1) {
			scanf_s("%4d", &gyort1[i][j]);
			if (j == 2)
				printf("\n");
		}
	}
	printf("行列2を入力してください\n");
	for (k = 0; k < 3; k++)
	{
		for (l = 0; l < 4; l++) {
			scanf_s("%4d", &gyort2[k][l]);
			if (l == 3)
				printf("\n");
		}
	}
	printf("行列1と行列2の積は:\n");
	for (m = 0; m < 4; m++)
	{
		for (n = 0; n < 4; n++) {
			sum[m][n] = gyort1[m][0] * gyort2[0][n] + gyort1[m][1] * gyort2[1][n] + gyort1[m][2] * gyort2[2][n];
			printf("%4d  ", sum[m][n]);

			if (n == 3)
				printf("\n\n");
		}
	}*/

	/*int N;
	int K;
	int i;
	int j;

	scanf_s("%d", &N);

	int n[8];
	int nmin;
	int nmax;

	for (j = 1; j < N; j++)
	{
		scanf_s("%d", &n[j]);
	}
	nmin = n[1];
	nmax = n[1];

	for (i = 2; i <= N; i++)
	{
		if (n[i] < nmin)
		{
			nmin = n[i];
		}
		if (n[i] > nmax);
		{
			nmax = n[i];
		}
	}

	printf("%d\n", nmax);
	printf("%d", nmin);*/
	
	/*int A, B, x;

	scanf_s("%d", &A);
	scanf_s("%d", &B);

	x = B % A;

	if (x == 0)
		printf("%d", x);
	else
		printf("No");*/
	
	char S[100];
	int i;

	scanf("%s", S);

	for (i = 0; i < 97; i++)
	{
		if (S[i] == 'O' && S[i + 1] == 'O' && S[i + 2] == 'O')
		{
			printf("East\n");
			i = 100;
			return 0;
		}
		if (S[i] == 'X' && S[i + 1] == 'X' && S[i + 2] == 'X')
		{
			printf("West\n");
			i = 100;
			return 0;
		}
	}
		
	printf("NA");
		
	end();
	return 0;
}

0