結果
| 問題 | No.1279 Array Battle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-11 20:26:14 |
| 言語 | Ruby (4.0.6 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 386 bytes |
| 記録 | |
| コンパイル時間 | 11 ms |
| コンパイル使用メモリ | 8,704 KB |
| 実行使用メモリ | 76,800 KB |
| 最終ジャッジ日時 | 2026-08-23 11:49:57 |
| 合計ジャッジ時間 | 2,662 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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