結果

問題 No.723 2つの数の和
ユーザー _matumo__matumo_
提出日時 2018-09-13 17:27:54
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 594 bytes
コンパイル時間 2,066 ms
コンパイル使用メモリ 102,600 KB
実行使用メモリ 31,420 KB
最終ジャッジ日時 2023-09-13 19:55:14
合計ジャッジ時間 5,281 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
22,080 KB
testcase_01 AC 61 ms
22,112 KB
testcase_02 AC 61 ms
22,048 KB
testcase_03 AC 92 ms
27,908 KB
testcase_04 AC 98 ms
30,600 KB
testcase_05 AC 95 ms
28,248 KB
testcase_06 AC 97 ms
28,400 KB
testcase_07 AC 82 ms
24,036 KB
testcase_08 AC 83 ms
24,240 KB
testcase_09 AC 98 ms
28,608 KB
testcase_10 AC 80 ms
24,032 KB
testcase_11 AC 71 ms
24,516 KB
testcase_12 AC 85 ms
24,580 KB
testcase_13 AC 100 ms
28,720 KB
testcase_14 AC 76 ms
25,304 KB
testcase_15 AC 80 ms
24,244 KB
testcase_16 AC 87 ms
24,888 KB
testcase_17 AC 95 ms
30,200 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 61 ms
24,068 KB
testcase_21 AC 61 ms
20,028 KB
testcase_22 AC 62 ms
22,020 KB
testcase_23 AC 100 ms
30,860 KB
testcase_24 AC 77 ms
23,388 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
namespace YukiCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var va = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var vb = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int N = va[0];
            int M = va[1];
            int[] xa = new int[200000 + 1];
            var xSum = 0;
            foreach (var n in vb) if (M - n >= 0 && M - n <= 200000) xa[M - n]++;
            foreach (var n in vb)   xSum += xa[n];
            Console.WriteLine(xSum);
        }
    }
}
0