結果
| 問題 | No.1909 Detect from Substrings |
| コンテスト | |
| ユーザー |
Moss_Local
|
| 提出日時 | 2022-04-22 21:16:59 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 766 bytes |
| 記録 | |
| コンパイル時間 | 318 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2024-06-24 02:17:38 |
| 合計ジャッジ時間 | 4,451 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 2 |
| other | AC * 8 WA * 8 RE * 20 |
ソースコード
from collections import defaultdict
from functools import lru_cache
from sys import flags, stdin
import math
import re
import queue
import typing
import itertools
import bisect
import statistics
# import numpy as np
# from numpy.core.function_base import _needs_add_docstring
# from numpy.core.numeric import outer
input = stdin.readline
MOD = 1000000007
INF = 122337203685477580
def solve():
n, m = map(int, input().split())
if n > 2:
print(0)
return
# a = input()
# b = input()
# print(a[1:-1])
# print(b[:-2])
if a[1:-1] == b[:-2] and b[1:-1] == a[:-2]:
print(2)
elif a[1:-1] == b[:-2] or b[1:-1] == a[:-2]:
print(1)
else:
print(0)
return
if __name__ == '__main__':
solve()
Moss_Local