結果
| 問題 | No.3685 ワロングアンサーやんけ! |
| コンテスト | |
| ユーザー |
まぬお
|
| 提出日時 | 2026-09-05 14:10:02 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 797 bytes |
| 記録 | |
| コンパイル時間 | 251 ms |
| コンパイル使用メモリ | 95,820 KB |
| 実行使用メモリ | 97,888 KB |
| 最終ジャッジ日時 | 2026-09-05 14:10:38 |
| 合計ジャッジ時間 | 6,118 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 WA * 22 |
ソースコード
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right, insort
from itertools import permutations, combinations, groupby
from heapq import heappop, heappush
import math, sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
def printl(li, sep=" "): print(sep.join(map(str, li)))
def yn(flag): print(Yes if flag else No)
_int = lambda x: int(x)-1
MOD = 998244353 #10**9+7
INF = 1<<60
Yes, No = "Yes", "No"
for _ in range(int(input())):
R = list(input())
S = input()
K = int(input())
if S == "NotWarong":
printl(R, "")
continue
N = len(R)
for i in range(K):
if R[i] == "?":
R[i] = "A"
if R[K:].count("?") == 1 and R[K:].count("W") == 0:
R[R[K:].index("?")+K] = "W"
printl(R, "")
まぬお