結果
問題 | No.120 傾向と対策:門松列(その1) |
ユーザー |
![]() |
提出日時 | 2015-01-08 23:52:56 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 550 bytes |
コンパイル時間 | 769 ms |
コンパイル使用メモリ | 119,340 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 01:59:31 |
合計ジャッジ時間 | 1,572 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 4 |
ソースコード
import std.stdio, std.conv, std.math, std.string, std.range, std.array,std.algorithm;void main(){auto T = readln().strip().to!int();foreach(immutable i; 0 .. T) {auto N = readln().strip().to!int();auto L = readln().strip().split().map!(to!int)().array;int bef = -1;int t = 1;L.sort();auto tps = L.group().array();tps.sort!"a[1] > b[1]";int[] kadomatsu;kadomatsu.length = 3;foreach(tp; tps) {kadomatsu.minPos[0] += tp[1];}writeln(kadomatsu.reduce!min());}}