結果
問題 | No.267 トランプソート |
ユーザー | Leonardone |
提出日時 | 2015-12-21 02:27:29 |
言語 | Ruby (3.3.0) |
結果 |
AC
|
実行時間 | 90 ms / 1,000 ms |
コード長 | 738 bytes |
コンパイル時間 | 833 ms |
コンパイル使用メモリ | 11,940 KB |
実行使用メモリ | 16,012 KB |
最終ジャッジ日時 | 2023-10-18 00:10:24 |
合計ジャッジ時間 | 3,389 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 88 ms
16,012 KB |
testcase_01 | AC | 88 ms
16,012 KB |
testcase_02 | AC | 89 ms
16,012 KB |
testcase_03 | AC | 87 ms
16,012 KB |
testcase_04 | AC | 85 ms
16,012 KB |
testcase_05 | AC | 90 ms
16,012 KB |
testcase_06 | AC | 87 ms
16,012 KB |
testcase_07 | AC | 87 ms
16,012 KB |
testcase_08 | AC | 87 ms
16,012 KB |
testcase_09 | AC | 85 ms
16,012 KB |
testcase_10 | AC | 89 ms
16,008 KB |
testcase_11 | AC | 88 ms
16,012 KB |
testcase_12 | AC | 85 ms
16,012 KB |
testcase_13 | AC | 84 ms
16,012 KB |
testcase_14 | AC | 87 ms
16,012 KB |
testcase_15 | AC | 86 ms
16,012 KB |
testcase_16 | AC | 87 ms
16,012 KB |
testcase_17 | AC | 88 ms
16,012 KB |
testcase_18 | AC | 86 ms
16,012 KB |
testcase_19 | AC | 85 ms
16,012 KB |
testcase_20 | AC | 87 ms
16,012 KB |
testcase_21 | AC | 84 ms
16,012 KB |
testcase_22 | AC | 87 ms
16,012 KB |
コンパイルメッセージ
Main.rb:21: warning: assigned but unused variable - n Syntax OK
ソースコード
#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU ############################################################ def gs() gets.chomp end def gi() gets.to_i end def gss() gs.split end def gis() gss.map(&:to_i) end def nmapf(n,f) n.times.map{ __send__ f } end def ngs(n) nmapf n,:gs end def ngi(n) nmapf n,:gi end def ngss(n) nmapf n,:gss end def ngis(n) nmapf n,:gis end def arr2d(h,w,v=0) h.times.map{[v] * w} end def for2p(hr,wr,&pr) hr.each{|i|wr.each{|j| yield(i,j)}} end def nsum(n) n * (n + 1) / 2 end def vcount(d,r=Hash.new(0)) d.inject(r){|r,e| r[e]+=1;r} end ############################################################ n = gi puts gss.sort_by{|s| 'DCHS'.index(s[0]) * 100 + 'A23456789TJQK'.index(s[1]) } * " "