結果

問題 No.2517 Right Triangles on Circle
ユーザー 👑 kakel-sankakel-san
提出日時 2023-10-27 21:32:19
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 796 bytes
コンパイル時間 7,476 ms
コンパイル使用メモリ 157,988 KB
実行使用メモリ 199,584 KB
最終ジャッジ日時 2023-10-27 21:32:43
合計ジャッジ時間 12,407 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
32,712 KB
testcase_01 AC 69 ms
32,496 KB
testcase_02 AC 71 ms
32,708 KB
testcase_03 AC 64 ms
32,496 KB
testcase_04 AC 70 ms
32,712 KB
testcase_05 AC 69 ms
32,708 KB
testcase_06 AC 71 ms
32,872 KB
testcase_07 AC 70 ms
32,708 KB
testcase_08 AC 72 ms
32,872 KB
testcase_09 AC 70 ms
32,708 KB
testcase_10 AC 78 ms
32,880 KB
testcase_11 AC 71 ms
32,708 KB
testcase_12 AC 71 ms
32,708 KB
testcase_13 AC 176 ms
60,256 KB
testcase_14 AC 115 ms
55,104 KB
testcase_15 AC 165 ms
64,624 KB
testcase_16 AC 175 ms
64,440 KB
testcase_17 AC 138 ms
55,440 KB
testcase_18 AC 147 ms
54,104 KB
testcase_19 AC 125 ms
51,748 KB
testcase_20 AC 129 ms
52,076 KB
testcase_21 AC 152 ms
61,860 KB
testcase_22 AC 86 ms
44,896 KB
testcase_23 AC 129 ms
53,560 KB
testcase_24 AC 107 ms
49,232 KB
testcase_25 AC 82 ms
40,028 KB
testcase_26 AC 147 ms
58,372 KB
testcase_27 AC 88 ms
40,728 KB
testcase_28 AC 93 ms
38,020 KB
testcase_29 AC 107 ms
48,552 KB
testcase_30 AC 90 ms
39,644 KB
testcase_31 AC 135 ms
199,584 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (82 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var c = NList;
        var (n, m) = (c[0], c[1]);
        var a = NList;
        if (m % 2 == 1)
        {
            WriteLine(0);
            return;
        }
        var set = new HashSet<int>(a);
        var ans = 0L;
        foreach (var ai in a) if (ai <= m / 2 && set.Contains(ai + m / 2)) ans += n - 2;
        WriteLine(ans); 
    }
}
0