結果

問題 No.331 CodeRunnerでやれ
ユーザー uwiuwi
提出日時 2015-12-19 17:07:50
言語 Java21
(openjdk 21)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 1,308 bytes
コンパイル時間 3,788 ms
コンパイル使用メモリ 75,500 KB
実行使用メモリ 86,220 KB
平均クエリ数 12947.71
最終ジャッジ日時 2023-09-23 22:28:51
合計ジャッジ時間 42,412 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 278 ms
69,996 KB
testcase_01 AC 262 ms
70,696 KB
testcase_02 AC 754 ms
73,760 KB
testcase_03 AC 325 ms
68,280 KB
testcase_04 AC 703 ms
71,800 KB
testcase_05 AC 761 ms
73,852 KB
testcase_06 AC 931 ms
76,244 KB
testcase_07 TLE -
testcase_08 AC 794 ms
73,796 KB
testcase_09 AC 4,962 ms
85,064 KB
testcase_10 AC 871 ms
73,644 KB
testcase_11 AC 2,471 ms
83,100 KB
testcase_12 AC 4,920 ms
86,220 KB
testcase_13 AC 2,771 ms
81,616 KB
testcase_14 AC 3,879 ms
84,512 KB
testcase_15 AC 1,902 ms
81,180 KB
testcase_16 AC 4,059 ms
84,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package writer;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class RandomCrawler {
	static Scanner in;
	static PrintWriter out;
	static String INPUT = "";
	
	static void solve()
	{
		Random gen = new Random(0);
		while(true){
			String input = in.next();
			if(input.charAt(0) >= '0' && input.charAt(0) <= '9'){
				if(input.equals("20151224")){
					while(true){
						out.println("F");
						out.flush();
						int s = read();
						if(s != 20151224)break;
					}
					break;
				}
			}else{
				break;
			}
			char command = "FBLR".charAt(gen.nextInt(4));
			out.println(command);
			out.flush();
		}
	}
	
	static int read()
	{
		String z = in.next();//Line().trim();
		if(z.charAt(0) >= '0' && z.charAt(0) <= '9')return Integer.parseInt(z);
		return -1;
	}
	
	public static void main(String[] args) throws Exception
	{
		in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);
		
		solve();
		out.flush();
	}
	
	static int ni() { return Integer.parseInt(in.next()); }
	static long nl() { return Long.parseLong(in.next()); }
	static double nd() { return Double.parseDouble(in.next()); }
	static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); }
}
0