結果
問題 | No.571 3人兄弟(その2) |
ユーザー |
|
提出日時 | 2017-10-06 22:28:51 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 758 bytes |
コンパイル時間 | 758 ms |
コンパイル使用メモリ | 124,056 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 21:59:46 |
合計ジャッジ時間 | 1,479 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string;import std.container; // SList, DList, BinaryHeapimport std.typecons; // Tuple, Nullable, BigFlagsimport std.math; // math functionsimport std.numeric; // gcd, fftimport std.bigint; // BigIntimport std.random; // randomimport std.bitmanip; // BitArrayimport core.bitop; // bit operationimport std.regex; // RegEximport std.uni; // unicodevoid main(){struct Info { int h, w; char i; }auto info = new Info[](3);foreach (i; 0..3) {auto rd = readln.split.to!(int[]), h = rd[0], w = rd[1];info[i] = Info(h, w, cast(char)(i + 'A'));}info.sort!((a, b) => a.h == b.h ? a.w < b.w : a.h > b.h);foreach (i; 0..3) writeln(info[i].i);}