結果

問題 No.2035 Tunnel
ユーザー DrDrpilotDrDrpilot
提出日時 2022-09-11 18:37:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 168 ms / 2,000 ms
コード長 731 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 9,516 KB
最終ジャッジ日時 2023-08-18 21:59:14
合計ジャッジ時間 5,395 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,756 KB
testcase_01 AC 19 ms
8,772 KB
testcase_02 AC 20 ms
8,816 KB
testcase_03 AC 20 ms
8,764 KB
testcase_04 AC 21 ms
8,708 KB
testcase_05 AC 143 ms
9,372 KB
testcase_06 AC 135 ms
9,256 KB
testcase_07 AC 145 ms
9,372 KB
testcase_08 AC 54 ms
9,412 KB
testcase_09 AC 58 ms
9,328 KB
testcase_10 AC 168 ms
9,364 KB
testcase_11 AC 95 ms
9,256 KB
testcase_12 AC 107 ms
9,516 KB
testcase_13 AC 30 ms
9,000 KB
testcase_14 AC 46 ms
9,168 KB
testcase_15 AC 100 ms
9,280 KB
testcase_16 AC 81 ms
9,232 KB
testcase_17 AC 21 ms
8,868 KB
testcase_18 AC 29 ms
8,892 KB
testcase_19 AC 51 ms
9,008 KB
testcase_20 AC 96 ms
9,404 KB
testcase_21 AC 65 ms
8,980 KB
testcase_22 AC 67 ms
9,008 KB
testcase_23 AC 38 ms
8,872 KB
testcase_24 AC 83 ms
9,092 KB
testcase_25 AC 100 ms
9,332 KB
testcase_26 AC 94 ms
9,232 KB
testcase_27 AC 126 ms
9,264 KB
testcase_28 AC 71 ms
9,168 KB
testcase_29 AC 40 ms
9,060 KB
testcase_30 AC 37 ms
8,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def I():return int(input())
def MAP():return map(int,input().split())
def MAPs():return map(str,input().split())
def LI(): return list(map(int,input().split()))
def TPL(): return tuple(map(int,input().split()))
def S():return input()
from collections import defaultdict,Counter,deque
from copy import deepcopy
from heapq import heapify,heappop,heappush
from bisect import bisect_left,bisect_right
from itertools import accumulate,product,permutations,combinations
from math import gcd,ceil,floor,sqrt,pi,sin,cos,tan,radians
inf=float('inf');mod=998244353;Mod=10**9+7

n=I()
grid=S()
ans=0
for i in range(n-1,-1,-1):
    if grid[i]=='#':
        if ans==0:
            ans=n-i
        else:
            ans=max(ans+2,n-i)
print(ans)
0