提出 #19324272


ソースコード 拡げる

import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
import itertools
import bisect
import re
from collections import Counter,deque,defaultdict
def iinput(): return int(input())
def imap(): return map(int, input().split())
def ilist(): return list(imap())
def irow(N): return [iinput() for i in range(N)]
def sinput(): return input().rstrip()
def smap(): return sinput().split()
def slist(): return list(smap())
def srow(N): return [sinput() for i in range(N)]

def main():
    n = iinput()
    a = ilist()
    a = [[a[i],i] for i in range(2**n)]
    a = deque(a)
    while a:
        if len(a) == 2:
            print(min(a)[1]+1)
            break
        b = a.popleft()
        c = a.popleft()
        a.append(max(b,c))
        # print(a)


if __name__=="__main__":
    main() 

提出情報

提出日時
問題 C - ABC Tournament
ユーザ kenken0305
言語 PyPy3 (7.3.0)
得点 300
コード長 908 Byte
結果 AC
実行時間 235 ms
メモリ 86360 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 12
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All extreme_00.txt, handmade_00.txt, handmade_01.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
extreme_00.txt AC 235 ms 85248 KiB
handmade_00.txt AC 71 ms 68416 KiB
handmade_01.txt AC 72 ms 68476 KiB
random_00.txt AC 116 ms 86004 KiB
random_01.txt AC 114 ms 86360 KiB
random_02.txt AC 114 ms 86256 KiB
random_03.txt AC 69 ms 68468 KiB
random_04.txt AC 71 ms 68248 KiB
random_05.txt AC 67 ms 68120 KiB
sample_01.txt AC 71 ms 68596 KiB
sample_02.txt AC 71 ms 68332 KiB
sample_03.txt AC 67 ms 68448 KiB