結果

問題 No.100 直列あみだくじ
ユーザー turai_ushiturai_ushi
提出日時 2015-02-02 23:26:57
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 350 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 11,356 KB
実行使用メモリ 15,380 KB
最終ジャッジ日時 2023-09-05 10:57:03
合計ジャッジ時間 6,079 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 83 ms
15,032 KB
testcase_05 AC 82 ms
15,316 KB
testcase_06 AC 82 ms
15,064 KB
testcase_07 AC 84 ms
15,320 KB
testcase_08 AC 83 ms
15,328 KB
testcase_09 AC 83 ms
15,256 KB
testcase_10 AC 82 ms
15,168 KB
testcase_11 WA -
testcase_12 AC 82 ms
15,344 KB
testcase_13 WA -
testcase_14 AC 84 ms
15,132 KB
testcase_15 AC 83 ms
15,284 KB
testcase_16 AC 83 ms
15,132 KB
testcase_17 AC 82 ms
15,240 KB
testcase_18 WA -
testcase_19 AC 83 ms
15,248 KB
testcase_20 AC 84 ms
15,172 KB
testcase_21 AC 83 ms
15,216 KB
testcase_22 AC 83 ms
15,276 KB
testcase_23 WA -
testcase_24 AC 83 ms
15,028 KB
testcase_25 AC 83 ms
15,328 KB
testcase_26 AC 84 ms
15,348 KB
testcase_27 AC 84 ms
15,128 KB
testcase_28 AC 84 ms
15,120 KB
testcase_29 AC 84 ms
15,216 KB
testcase_30 WA -
testcase_31 AC 84 ms
15,168 KB
testcase_32 WA -
testcase_33 AC 83 ms
15,348 KB
testcase_34 AC 84 ms
15,260 KB
testcase_35 WA -
testcase_36 AC 83 ms
15,312 KB
testcase_37 AC 82 ms
15,212 KB
testcase_38 AC 83 ms
15,168 KB
testcase_39 AC 83 ms
15,284 KB
testcase_40 AC 83 ms
15,124 KB
testcase_41 AC 85 ms
15,192 KB
testcase_42 AC 83 ms
15,328 KB
testcase_43 AC 83 ms
15,216 KB
testcase_44 AC 84 ms
15,120 KB
testcase_45 AC 84 ms
15,168 KB
testcase_46 WA -
testcase_47 AC 82 ms
15,132 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!/usr/bin/env ruby

a = STDIN.gets
a = a.chomp
b = a.to_i
c= STDIN.gets
array1 = Array.new(b)
i=0


strAry = c.split()
strAry.each do |youso|
  array1[i]=youso
i=i+1
end
i=0
j=0
k=0
while i<b-1 
	j=i+1

	while j<b

	if array1[i].to_i==j+1 && array1[j].to_i==i+1 
	k=k+1	
	end
	j=j+1
	end
i=i+1
end

if k%2==0
puts("Yes")
end
if k%2==1
puts("No")
end
0