結果
問題 | No.1694 ZerOne |
ユーザー | ophhdn |
提出日時 | 2021-10-01 21:54:11 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,606 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 82,408 KB |
実行使用メモリ | 82,100 KB |
最終ジャッジ日時 | 2024-07-19 11:08:13 |
合計ジャッジ時間 | 4,977 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 109 ms
80,384 KB |
testcase_01 | AC | 104 ms
80,384 KB |
testcase_02 | AC | 105 ms
80,128 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 96 ms
80,512 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 98 ms
80,384 KB |
testcase_12 | AC | 97 ms
80,256 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 104 ms
80,384 KB |
testcase_19 | AC | 97 ms
80,256 KB |
testcase_20 | AC | 116 ms
81,280 KB |
testcase_21 | AC | 117 ms
81,408 KB |
testcase_22 | AC | 117 ms
81,152 KB |
testcase_23 | AC | 115 ms
81,280 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | AC | 112 ms
81,152 KB |
testcase_29 | AC | 111 ms
81,408 KB |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
ソースコード
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify from copy import deepcopy import bisect import random from itertools import permutations, accumulate, combinations, product import sys import string from bisect import bisect_left, bisect_right from math import factorial, ceil, floor from operator import mul from functools import reduce from pprint import pprint from copy import deepcopy from math import gcd, log2,atan2,atan,sin,cos,pi import functools import typing def LI(): return list(map(int, sys.stdin.readline().split())) def I(): return int(sys.stdin.readline()) def LS(): return sys.stdin.readline().split() def S(): return sys.stdin.readline().strip() def IR(n): return [I() for i in range(n)] def LIR(n): return [LI() for i in range(n)] def SR(n): return [S() for i in range(n)] def LSR(n): return [LS() for i in range(n)] def SRL(n): return [list(S()) for i in range(n)] def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)] mod=10**9+7 INF=10**30 s=S() n=len(s) ans={s} for l_start in range(n): for r_start in range(l_start+1,n): l_cnt = 0 r_cnt=0 for d in range(n-1): if l_start+d>=r_start or r_start+d>=n: break l_cnt+=int(s[l_start+d]) r_cnt+=int(s[r_start+d]) if l_cnt==r_cnt: l=s[l_start:l_start+d] mid=s[l_start+d:r_start] r=s[r_start:r_start+d] last=s[r_start+d:] ns=s[:l_start]+r+mid+l+last ans.add(ns) print(len(ans))