結果

問題 No.2629 A replace B replace C
ユーザー tassei903tassei903
提出日時 2024-02-11 13:53:23
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 757 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 81,828 KB
実行使用メモリ 53,844 KB
最終ジャッジ日時 2024-02-13 06:29:03
合計ジャッジ時間 4,732 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,844 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 36 ms
53,460 KB
testcase_09 AC 36 ms
53,460 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 36 ms
53,460 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 36 ms
53,460 KB
testcase_22 AC 36 ms
53,460 KB
testcase_23 AC 35 ms
53,460 KB
testcase_24 AC 36 ms
53,460 KB
testcase_25 AC 36 ms
53,460 KB
testcase_26 AC 35 ms
53,460 KB
testcase_27 AC 36 ms
53,460 KB
testcase_28 AC 37 ms
53,460 KB
testcase_29 AC 37 ms
53,460 KB
testcase_30 AC 36 ms
53,460 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 37 ms
53,460 KB
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 AC 37 ms
53,460 KB
testcase_58 WA -
testcase_59 AC 36 ms
53,460 KB
testcase_60 WA -
testcase_61 AC 36 ms
53,460 KB
testcase_62 WA -
testcase_63 WA -
testcase_64 AC 36 ms
53,460 KB
testcase_65 AC 36 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
######################################################################

s = input()
t = input()

x1, x2, x3 = 0,0,0

for i in range(len(s)):
    if s[i] == t[i]:
        continue
    elif s[i] > t[i]:
        No()
        exit()
    elif s[i] == "A" and t[i] == "B":
        x1 += 1
    elif s[i] == "A" and t[i] == "C":
        x2 += 1
    elif s[i] == "B" and t[i] == "C":
        x3 += 1

if x1 == x2 == x3 == 0:
    Yes()
elif x1 == x3 and x1 > 0:
    Yes()
else:
    No()
0