結果

問題 No.1219 Mancala Combo
ユーザー buey_tbuey_t
提出日時 2023-03-19 12:21:28
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 1,496 bytes
コンパイル時間 510 ms
コンパイル使用メモリ 81,824 KB
実行使用メモリ 119,024 KB
最終ジャッジ日時 2023-10-18 17:43:56
合計ジャッジ時間 7,346 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
84,540 KB
testcase_01 AC 128 ms
84,544 KB
testcase_02 AC 129 ms
84,540 KB
testcase_03 AC 129 ms
84,540 KB
testcase_04 WA -
testcase_05 AC 131 ms
84,540 KB
testcase_06 WA -
testcase_07 AC 132 ms
84,536 KB
testcase_08 WA -
testcase_09 AC 130 ms
84,532 KB
testcase_10 WA -
testcase_11 AC 131 ms
84,540 KB
testcase_12 WA -
testcase_13 AC 131 ms
84,536 KB
testcase_14 AC 132 ms
84,544 KB
testcase_15 AC 131 ms
84,540 KB
testcase_16 WA -
testcase_17 AC 168 ms
108,676 KB
testcase_18 WA -
testcase_19 AC 160 ms
106,136 KB
testcase_20 WA -
testcase_21 AC 161 ms
103,836 KB
testcase_22 WA -
testcase_23 AC 172 ms
114,596 KB
testcase_24 WA -
testcase_25 AC 164 ms
105,996 KB
testcase_26 WA -
testcase_27 AC 174 ms
118,264 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
    
    
    '''
    
    
    
    '''
    
    N = int(input())
    A = list(map(int, input().split()))
    
    f = True
    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]+end-i)%i != 0:
            print('No')
            exit()
        f = False
    
    print('Yes')
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
if __name__ == '__main__':
    main()
0