結果

問題 No.548 国士無双
ユーザー nobigomunobigomu
提出日時 2018-05-27 01:33:36
言語 Lua
(LuaJit 2.1.1696795921)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 384 bytes
コンパイル時間 458 ms
コンパイル使用メモリ 5,152 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 17:27:08
合計ジャッジ時間 1,314 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 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 1 ms
4,348 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 1 ms
4,348 KB
testcase_16 AC 1 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 1 ms
4,348 KB
testcase_19 AC 1 ms
4,348 KB
testcase_20 WA -
testcase_21 AC 2 ms
4,348 KB
testcase_22 AC 1 ms
4,348 KB
testcase_23 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(function (f, n, l, r)
	local a,ret={},0
	for i=l,r do a[f(i)]=0 end
	for _=1,n do
		local c=io.stdin:read(1)
		if a[c]==nil or a[c]==2 then ret=-1 break end
		if a[c]==1 then ret=1 end
		a[c]=a[c]+1
	end
	if ret==-1 then print("Impossible")
	elseif ret==1 then for k,v in pairs(a) do if v==0 then print(k) end end
	else for i=l,r do print(f(i)) end end
end)(string.char, 13, 97, 109)
0