結果

問題 No.1005 BOT対策
ユーザー 👑 tatt61880tatt61880
提出日時 2020-03-25 00:10:15
言語 Kuin
(KuinC++ v.2021.9.17)
結果
WA  
実行時間 -
コード長 482 bytes
コンパイル時間 1,842 ms
コンパイル使用メモリ 145,696 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-14 15:59:54
合計ジャッジ時間 3,371 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

func main()
	var s: []char :: cui@input()
	var t: []char :: cui@input()
	if(^t = 1)
		for i(0, ^s - 1)
			if(s[i] = t[0])
				do cui@print("-1\n")
			end if
		end for
		do cui@print("0\n")
		ret
	end if
	var tpos: int :: 0
	var ans: int :: 0
	for i(0, ^s - 1)
		if(s[i] = t[tpos])
			do tpos :+ 1
			if(tpos = ^t)
				do ans :+ 1
				do tpos :: 0
				if(s[i] = t[0])
					do tpos :+ 1
				end if
			end if
		else
			do tpos :: 0
		end if
	end for
	do cui@print("\{ans}\n")
end func
0