結果

問題 No.571 3人兄弟(その2)
ユーザー te-sh
提出日時 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
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm, std.conv, std.range, std.stdio, std.string;
import std.container; // SList, DList, BinaryHeap
import std.typecons;  // Tuple, Nullable, BigFlags
import std.math;      // math functions
import std.numeric;   // gcd, fft
import std.bigint;    // BigInt
import std.random;    // random
import std.bitmanip;  // BitArray
import core.bitop;    // bit operation
import std.regex;     // RegEx
import std.uni;       // unicode

void 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);
}
0