結果

問題 No.2451 Redistribute Integers
ユーザー 👑 kakel-sankakel-san
提出日時 2023-09-01 21:25:24
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 328 ms / 2,000 ms
コード長 614 bytes
コンパイル時間 1,332 ms
コンパイル使用メモリ 64,068 KB
実行使用メモリ 67,324 KB
最終ジャッジ日時 2023-09-01 21:25:31
合計ジャッジ時間 6,023 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
21,576 KB
testcase_01 AC 58 ms
21,656 KB
testcase_02 AC 58 ms
21,564 KB
testcase_03 AC 59 ms
21,704 KB
testcase_04 AC 328 ms
67,324 KB
testcase_05 AC 60 ms
19,796 KB
testcase_06 AC 58 ms
21,648 KB
testcase_07 AC 60 ms
21,716 KB
testcase_08 AC 263 ms
63,240 KB
testcase_09 AC 59 ms
21,652 KB
testcase_10 AC 66 ms
19,860 KB
testcase_11 AC 67 ms
23,800 KB
testcase_12 AC 143 ms
39,880 KB
testcase_13 AC 298 ms
65,264 KB
testcase_14 AC 311 ms
66,872 KB
testcase_15 AC 193 ms
54,436 KB
testcase_16 AC 174 ms
47,896 KB
testcase_17 AC 246 ms
57,708 KB
testcase_18 AC 295 ms
63,636 KB
testcase_19 AC 83 ms
25,876 KB
testcase_20 AC 252 ms
60,732 KB
testcase_21 AC 302 ms
66,096 KB
権限があれば一括ダウンロードができます

ソースコード

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 string[] SList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => ReadLine()).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var n = NN;
        var a = NList;
        for (var i = 0; i < n; ++i) a[i] = (a[i] % n + n) % n;
        WriteLine(a.All(ai => ai == a[0]) ? "Yes" : "No");
    }
}
0