結果

問題 No.1219 Mancala Combo
ユーザー keymoonkeymoon
提出日時 2020-09-04 21:49:11
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 950 bytes
コンパイル時間 2,043 ms
コンパイル使用メモリ 104,812 KB
実行使用メモリ 41,628 KB
最終ジャッジ日時 2023-08-17 15:28:54
合計ジャッジ時間 5,817 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
24,052 KB
testcase_01 AC 58 ms
24,004 KB
testcase_02 AC 57 ms
21,988 KB
testcase_03 AC 57 ms
21,892 KB
testcase_04 AC 64 ms
22,052 KB
testcase_05 AC 63 ms
22,040 KB
testcase_06 AC 57 ms
21,808 KB
testcase_07 AC 65 ms
21,988 KB
testcase_08 AC 64 ms
22,044 KB
testcase_09 AC 57 ms
21,968 KB
testcase_10 AC 57 ms
23,884 KB
testcase_11 AC 66 ms
24,028 KB
testcase_12 AC 58 ms
23,880 KB
testcase_13 AC 65 ms
24,096 KB
testcase_14 AC 58 ms
21,880 KB
testcase_15 AC 58 ms
23,920 KB
testcase_16 AC 58 ms
21,920 KB
testcase_17 AC 114 ms
40,456 KB
testcase_18 AC 119 ms
38,892 KB
testcase_19 AC 102 ms
31,172 KB
testcase_20 AC 120 ms
39,220 KB
testcase_21 AC 97 ms
28,504 KB
testcase_22 AC 112 ms
35,800 KB
testcase_23 AC 124 ms
39,712 KB
testcase_24 AC 102 ms
30,716 KB
testcase_25 AC 102 ms
28,736 KB
testcase_26 AC 118 ms
36,944 KB
testcase_27 AC 131 ms
36,792 KB
testcase_28 AC 138 ms
41,628 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.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
public static class P
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        var a = Console.ReadLine().Split().Select(long.Parse).ToArray();
        for (int i = 0; i < a.Length; i++)
        {
            if (i + 1 < a[i])
            {
                Console.WriteLine("No");
                return;
            }
        }
        long add = 0;
        for (int i = a.Length - 1; i >= 0; i--)
        {
            if ((a[i] + add) % (i + 1) != 0)
            {
                Console.WriteLine("No");
                return;
            }
            add += (a[i] + add) / (i + 1);
        }
        Console.WriteLine("Yes");
    }
}
0