結果

問題 No.331 CodeRunnerでやれ
ユーザー bal4ubal4u
提出日時 2019-08-15 17:37:10
言語 C
(gcc 12.3.0)
結果
TLE  
実行時間 -
コード長 470 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 27,580 KB
実行使用メモリ 90,984 KB
平均クエリ数 10.00
最終ジャッジ日時 2023-09-23 18:01:45
合計ジャッジ時間 8,145 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 154 ms
23,796 KB
testcase_01 AC 140 ms
24,252 KB
testcase_02 AC 177 ms
24,244 KB
testcase_03 AC 180 ms
23,776 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

// yukicoder: No.331 CodeRunnerでやれ
// bal4u 2019.8.15

#include <stdio.h>
#include <stdlib.h>

int action(char ch) {
	char s[20];
	if (ch) {
		putchar(ch), putchar('\n');
		fflush(stdout);
	}
	scanf("%s", s);
	if (*s == 'M') exit(0);
	return atoi(s);
}
	

int main()
{
	int f, d = action(0);
	while (d) d = action('F');
	f = 1;
	while (1) {
		if (d == 0) d = action('L'), f = 1;
		else if (f) d = action('F'), f = 0;
		else d = action('R'), f = 1; 
	}
	return 0;
}
0