結果
問題 | No.2773 Wake up Record 1 |
ユーザー | _a |
提出日時 | 2024-06-07 21:31:32 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 65 ms / 2,000 ms |
コード長 | 1,617 bytes |
コンパイル時間 | 298 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 14,336 KB |
最終ジャッジ日時 | 2024-06-07 21:31:50 |
合計ジャッジ時間 | 2,182 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 33 ms
11,520 KB |
testcase_01 | AC | 31 ms
11,776 KB |
testcase_02 | AC | 31 ms
11,648 KB |
testcase_03 | AC | 40 ms
11,776 KB |
testcase_04 | AC | 30 ms
11,648 KB |
testcase_05 | AC | 50 ms
13,952 KB |
testcase_06 | AC | 37 ms
12,288 KB |
testcase_07 | AC | 50 ms
14,080 KB |
testcase_08 | AC | 38 ms
12,672 KB |
testcase_09 | AC | 41 ms
12,800 KB |
testcase_10 | AC | 38 ms
12,544 KB |
testcase_11 | AC | 48 ms
13,824 KB |
testcase_12 | AC | 44 ms
13,184 KB |
testcase_13 | AC | 34 ms
12,032 KB |
testcase_14 | AC | 40 ms
12,672 KB |
testcase_15 | AC | 31 ms
11,776 KB |
testcase_16 | AC | 50 ms
14,080 KB |
testcase_17 | AC | 46 ms
13,440 KB |
testcase_18 | AC | 36 ms
12,288 KB |
testcase_19 | AC | 65 ms
14,336 KB |
testcase_20 | AC | 34 ms
12,032 KB |
testcase_21 | AC | 48 ms
13,820 KB |
testcase_22 | AC | 48 ms
13,952 KB |
testcase_23 | AC | 50 ms
13,952 KB |
testcase_24 | AC | 42 ms
13,056 KB |
ソースコード
import os, sys import math, decimal, queue, heapq, bisect, itertools, functools, collections, string from bisect import bisect, bisect_left from collections import defaultdict, OrderedDict, deque, Counter from functools import cmp_to_key, lru_cache, reduce from heapq import heapify, heappush, heappushpop, heappop, heapreplace, nlargest, nsmallest from itertools import accumulate, chain, combinations, combinations_with_replacement, compress, count, cycle, dropwhile, filterfalse, groupby, islice, permutations, product, repeat, starmap, takewhile, tee, zip_longest from math import gcd, factorial, isqrt, comb, perm, prod, inf from queue import Queue, PriorityQueue, LifoQueue from string import ascii_letters, ascii_lowercase, ascii_uppercase, digits, hexdigits, octdigits LOCAL = sys.argv[0] if '4a' in sys.argv[0] else None P = lambda *p: [print(i, end=' ') for i in p] if LOCAL else None PI = lambda *p: print(' '.join(map(str, p))) or None PII = lambda X: [PI(*row) for row in X] sys.stdin = open(os.path.join(os.getcwd(), 'a1.txt'), 'r') if LOCAL else sys.stdin I = lambda: [int(a) for l in sys.stdin for a in l.strip().split()] S = lambda: [a for l in sys.stdin for a in l.strip().split()] IM = lambda: [[int(a) for a in l.split()] for l in sys.stdin] SM = lambda: [[a for a in l.split()] for l in sys.stdin] az, AZ, mod = ascii_lowercase, ascii_uppercase, 1_000_000_007 A = S() # P(A) def solution(A): s = A[1] res = [] c = 0 for i in range(1, len(s)): if s[i - 1] == 'x' and s[i] == 'o': res += [i + 1] c += 1 print(c) PI(*res) solution(A)