結果

問題 No.1544 [Cherry 2nd Tune C] Synchroscope
ユーザー Takuya NoguchiTakuya Noguchi
提出日時 2021-06-23 21:45:40
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 213 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 11,268 KB
実行使用メモリ 15,716 KB
最終ジャッジ日時 2023-09-07 03:35:37
合計ジャッジ時間 37,830 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,232 KB
testcase_01 AC 83 ms
15,092 KB
testcase_02 AC 80 ms
15,244 KB
testcase_03 AC 83 ms
15,504 KB
testcase_04 AC 82 ms
15,348 KB
testcase_05 AC 83 ms
15,376 KB
testcase_06 AC 84 ms
15,420 KB
testcase_07 AC 82 ms
15,340 KB
testcase_08 AC 85 ms
15,372 KB
testcase_09 AC 82 ms
15,332 KB
testcase_10 AC 85 ms
15,372 KB
testcase_11 AC 84 ms
15,424 KB
testcase_12 AC 82 ms
15,308 KB
testcase_13 AC 81 ms
15,260 KB
testcase_14 AC 83 ms
15,380 KB
testcase_15 AC 83 ms
15,560 KB
testcase_16 AC 87 ms
15,464 KB
testcase_17 AC 85 ms
15,332 KB
testcase_18 AC 83 ms
15,004 KB
testcase_19 AC 83 ms
15,200 KB
testcase_20 AC 86 ms
15,328 KB
testcase_21 AC 83 ms
15,464 KB
testcase_22 AC 83 ms
15,052 KB
testcase_23 AC 83 ms
15,436 KB
testcase_24 AC 84 ms
15,580 KB
testcase_25 AC 84 ms
15,536 KB
testcase_26 AC 85 ms
15,556 KB
testcase_27 AC 87 ms
15,460 KB
testcase_28 AC 84 ms
15,504 KB
testcase_29 AC 88 ms
15,452 KB
testcase_30 AC 85 ms
15,524 KB
testcase_31 AC 85 ms
15,552 KB
testcase_32 AC 85 ms
15,576 KB
testcase_33 TLE -
testcase_34 AC 78 ms
15,092 KB
testcase_35 AC 78 ms
15,044 KB
testcase_36 AC 82 ms
15,280 KB
testcase_37 AC 80 ms
15,140 KB
testcase_38 TLE -
testcase_39 TLE -
testcase_40 TLE -
testcase_41 TLE -
testcase_42 TLE -
testcase_43 TLE -
testcase_44 TLE -
testcase_45 TLE -
testcase_46 TLE -
testcase_47 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:6: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

N, M = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
B = gets.split.map(&:to_i)

if (A & B).empty?
  puts -1
else
  (N * M).times do |i|
    next unless A[i % N] == B[i % M]

    puts i + 1
    break
  end
end
0