結果
| 問題 |
No.1279 Array Battle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-11 20:26:14 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 386 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 74,752 KB |
| 最終ジャッジ日時 | 2024-07-22 18:50:37 |
| 合計ジャッジ時間 | 2,463 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 2 |
コンパイルメッセージ
Syntax OK
ソースコード
# frozen_string_literal: true
3.times.map { gets } in [_, a, b]
[a, b].map { _1.split.map(&:to_i) } in [a, b]
[a.sort, b.sort { _2 <=> _1 }].transpose.group_by { _1 > _2 ? :win : :lose } in results
puts results.key?(:win) ? (results[:win].map(&:first).permutation.to_a.length * results[:lose].map(&:first).permutation.to_a.length) : results[:lose].map(&:first).permutation.to_a.length