結果
| 問題 | 
                            No.99 ジャンピング駒
                             | 
                    
| コンテスト | |
| ユーザー | 
                             hokto
                         | 
                    
| 提出日時 | 2018-12-20 17:09:15 | 
| 言語 | Ruby  (3.4.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 435 bytes | 
| コンパイル時間 | 374 ms | 
| コンパイル使用メモリ | 7,296 KB | 
| 実行使用メモリ | 28,064 KB | 
| 最終ジャッジ日時 | 2024-09-25 09:05:57 | 
| 合計ジャッジ時間 | 12,545 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 2 WA * 1 TLE * 1 -- * 2 | 
コンパイルメッセージ
Syntax OK
ソースコード
numb_input=gets.to_i count=numb_input.to_i point_input=gets.chomp point=point_input.split.map(&:to_i) point.sort! flag=true begin flag=true current_pos=0.to_i while(current_pos.to_i <point.size.to_i+1) if (point[current_pos].to_i+point[current_pos+1].to_i)%2==1 flag=false point.delete_at(current_pos) point.delete_at(current_pos) count-=2 else current_pos+=1.to_i end end end while !flag&&count >1 print count
            
hokto