結果

問題 No.331 CodeRunnerでやれ
コンテスト
ユーザー bal4u
提出日時 2019-08-15 18:46:09
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
TLE  
実行時間 -
コード長 591 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 245 ms
コンパイル使用メモリ 37,440 KB
最終ジャッジ日時 2026-02-22 04:16:18
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 7 TLE * 1 -- * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

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

int action(char ch) {
	char s[20]; int d;
	while (1) {
		if (ch) {
			putchar(ch), putchar('\n');
			fflush(stdout);
		}
		scanf("%s", s);
		if (*s == 'M') exit(0);
		if ((d = atoi(s)) < 20151224) break;
		ch = 'F';
	}
	return d;
}
	
int main()
{
	int d = action(0);
	while (d) d = action('F');
	d = action('L');
	while (1) {
		if (d == 0) d = action('R');
		while (d == 0) d = action('L');
		while (d = action('F')) {
			d = action('R');
			if (d == 0) d = action('L');
		}
	}
	return 0;
}
0