結果
| 問題 |
No.2044 Infinite Nim
|
| コンテスト | |
| ユーザー |
siman
|
| 提出日時 | 2022-08-25 06:05:56 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 304 bytes |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 20,352 KB |
| 最終ジャッジ日時 | 2024-10-12 12:46:46 |
| 合計ジャッジ時間 | 5,680 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 WA * 2 |
コンパイルメッセージ
Syntax OK
ソースコード
N = gets.to_i
A = gets.split.map(&:to_i)
B = A.select(&:positive?)
mc = A.count(-1)
if mc == 0
if A.inject(:^) == 0
puts 'Second'
else
puts 'First'
end
else
if mc % 2 == 0
if B.inject(:^) == 0
puts 'Second'
else
puts 'First'
end
else
puts 'First'
end
end
siman