結果

問題 No.1219 Mancala Combo
ユーザー buey_tbuey_t
提出日時 2023-03-19 12:29:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,663 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 81,812 KB
実行使用メモリ 119,100 KB
最終ジャッジ日時 2023-10-18 17:44:02
合計ジャッジ時間 5,533 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
84,524 KB
testcase_01 AC 131 ms
84,524 KB
testcase_02 AC 130 ms
84,520 KB
testcase_03 AC 130 ms
84,524 KB
testcase_04 WA -
testcase_05 AC 130 ms
84,528 KB
testcase_06 WA -
testcase_07 AC 131 ms
84,532 KB
testcase_08 WA -
testcase_09 AC 129 ms
84,528 KB
testcase_10 WA -
testcase_11 AC 130 ms
84,524 KB
testcase_12 WA -
testcase_13 AC 130 ms
84,288 KB
testcase_14 AC 130 ms
84,520 KB
testcase_15 AC 130 ms
84,524 KB
testcase_16 WA -
testcase_17 AC 167 ms
108,676 KB
testcase_18 WA -
testcase_19 AC 165 ms
106,032 KB
testcase_20 WA -
testcase_21 AC 160 ms
103,832 KB
testcase_22 WA -
testcase_23 AC 173 ms
114,588 KB
testcase_24 WA -
testcase_25 AC 165 ms
105,996 KB
testcase_26 WA -
testcase_27 AC 176 ms
118,260 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    try:
        import pypyjit
        pypyjit.set_param('max_unroll_recursion=-1')
    except:
        pass
    try:
        import sys
        sys.setrecursionlimit(10**7)
    except:
        pass
    from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum
    from heapq import heapify, heappop, heappush
    from bisect import bisect_left, bisect_right
    from copy import deepcopy
    import copy
    import random
    from collections import deque,Counter,defaultdict
    from itertools import permutations,combinations
    from decimal import Decimal,ROUND_HALF_UP
    #tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
    from functools import lru_cache, reduce
    #@lru_cache(maxsize=None)
    from operator import add,sub,mul,xor,and_,or_,itemgetter
    INF = 10**18
    mod1 = 10**9+7
    mod2 = 998244353
    
    #DecimalならPython
    
    
    '''
    回数を増やさないといけない
    %iの値によって
    
    最初から自分より大きい場合は無理
    '''
    
    N = int(input())
    A = list(map(int, input().split()))
    
    f = True
    ad = 0
    end = N
    for i in reversed(range(1,N+1)):
        if A[i-1] == 0 and f:
            end = i-1
            continue
        if (A[i-1]+ad)%i != 0 or A[i-1]>i:
            print('No')
            exit()
        ad += (A[i-1]+end-i+ad)//i
        f = False
    
    print('Yes')
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
if __name__ == '__main__':
    main()
0