結果

問題 No.5002 stick xor
ユーザー ikdikd
提出日時 2018-05-27 20:45:28
言語 Ruby
(3.3.0)
結果
AC  
実行時間 15 ms / 1,000 ms
コード長 233 bytes
コンパイル時間 1,395 ms
実行使用メモリ 4,012 KB
スコア 125
最終ジャッジ日時 2018-05-27 20:45:40
ジャッジサーバーID
(参考情報)
judge8 /
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
4,000 KB
testcase_01 AC 10 ms
3,996 KB
testcase_02 AC 11 ms
4,000 KB
testcase_03 AC 11 ms
4,004 KB
testcase_04 AC 10 ms
3,996 KB
testcase_05 AC 10 ms
4,000 KB
testcase_06 AC 10 ms
3,996 KB
testcase_07 AC 13 ms
3,996 KB
testcase_08 AC 11 ms
4,004 KB
testcase_09 AC 11 ms
4,000 KB
testcase_10 AC 13 ms
3,992 KB
testcase_11 AC 11 ms
3,996 KB
testcase_12 AC 11 ms
4,000 KB
testcase_13 AC 15 ms
3,996 KB
testcase_14 AC 15 ms
4,000 KB
testcase_15 AC 14 ms
4,000 KB
testcase_16 AC 11 ms
4,012 KB
testcase_17 AC 11 ms
4,004 KB
testcase_18 AC 10 ms
4,000 KB
testcase_19 AC 11 ms
4,000 KB
testcase_20 AC 11 ms
3,992 KB
testcase_21 AC 10 ms
4,000 KB
testcase_22 AC 10 ms
3,996 KB
testcase_23 AC 10 ms
4,004 KB
testcase_24 AC 10 ms
4,000 KB
testcase_25 AC 11 ms
4,000 KB
testcase_26 AC 11 ms
4,000 KB
testcase_27 AC 11 ms
4,000 KB
testcase_28 AC 11 ms
4,004 KB
testcase_29 AC 10 ms
4,000 KB
testcase_30 AC 11 ms
4,004 KB
testcase_31 AC 13 ms
4,000 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - k
Syntax OK

ソースコード

diff #

n, k=gets.split.map(&:to_i)
li=gets.split.map(&:to_i)
n.times{gets}

li.each do |l|
  x, y=rand(1..(n-l+1)), rand(1..(n-l+1))
  if rand(0..1)%2==0
    puts "#{x} #{y} #{x} #{y+l-1}"
  else
    puts "#{x} #{y} #{x+l-1} #{y}"
  end
end
0