結果

問題 No.893 お客様を誘導せよ
ユーザー kokatsukokatsu
提出日時 2022-04-20 22:12:07
言語 D
(dmd 2.107.1)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 2,282 ms
コンパイル使用メモリ 224,864 KB
実行使用メモリ 6,980 KB
最終ジャッジ日時 2023-09-04 16:49:58
合計ジャッジ時間 4,006 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 15 ms
4,912 KB
testcase_03 AC 52 ms
6,696 KB
testcase_04 AC 51 ms
5,652 KB
testcase_05 AC 47 ms
6,980 KB
testcase_06 AC 32 ms
5,408 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 109 ms
6,964 KB
testcase_09 AC 3 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 3 ms
4,380 KB
testcase_12 AC 4 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import std;

struct S {
    long x, y;
}

void main() {
    int N;
    readf("%d\n", N);

    S[] pos;
    int[] num;
    foreach (i; 0 .. N) {
        auto A = readln.chomp.split.to!(int[]);

        foreach (j, a; A[1..$]) {
            pos ~= S(j, i);
            num ~= a;
        }
    }

    zip(pos, num).sort!"a[0].x == b[0].x ? a[0].y < b[0].y : a[0].x < b[0].x";

    writefln("%(%s %)", num);
}
0