結果

問題 No.1219 Mancala Combo
ユーザー buey_tbuey_t
提出日時 2023-03-19 12:29:53
言語 PyPy3
(7.3.8)
結果
WA  
実行時間 -
コード長 1,663 bytes
コンパイル時間 322 ms
使用メモリ 120,856 KB
最終ジャッジ日時 2023-03-19 12:30:05
合計ジャッジ時間 10,209 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 240 ms
88,640 KB
testcase_01 AC 241 ms
88,524 KB
testcase_02 AC 242 ms
88,616 KB
testcase_03 AC 246 ms
88,720 KB
testcase_04 WA -
testcase_05 AC 243 ms
88,756 KB
testcase_06 WA -
testcase_07 AC 243 ms
88,648 KB
testcase_08 WA -
testcase_09 AC 257 ms
88,564 KB
testcase_10 WA -
testcase_11 AC 249 ms
88,572 KB
testcase_12 WA -
testcase_13 AC 243 ms
88,620 KB
testcase_14 AC 241 ms
88,724 KB
testcase_15 AC 274 ms
88,640 KB
testcase_16 WA -
testcase_17 AC 270 ms
110,296 KB
testcase_18 WA -
testcase_19 AC 267 ms
108,044 KB
testcase_20 WA -
testcase_21 AC 269 ms
105,452 KB
testcase_22 WA -
testcase_23 AC 278 ms
116,432 KB
testcase_24 WA -
testcase_25 AC 299 ms
107,616 KB
testcase_26 WA -
testcase_27 AC 280 ms
120,040 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