結果
| 問題 | No.3685 ワロングアンサーやんけ! |
| コンテスト | |
| ユーザー |
ONPU3
|
| 提出日時 | 2026-09-05 14:10:25 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 621 bytes |
| 記録 | |
| コンパイル時間 | 1,930 ms |
| コンパイル使用メモリ | 332,464 KB |
| 実行使用メモリ | 9,808 KB |
| 最終ジャッジ日時 | 2026-09-05 14:11:00 |
| 合計ジャッジ時間 | 4,537 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 WA * 22 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main()
{
cin.tie(0)->sync_with_stdio(0);
ll t;cin>>t;
while(t--)
{
string r,s;
ll k;
cin>>r>>s>>k;
if(s=="NotWarong")
{
cout<<r<<"\n";
continue;
}
bool can=false,flag=true;
for(int i=0;i<(int)r.size();i++)if(r[i]=='W')can=true;
for(int i=0;i<(int)r.size();i++)
{
if(r[i]=='W')flag=false;
if(flag&&k)r[i]='A',k--;
else if(!can&&r[i]=='?')r[i]='W',can=true;
}
cout<<r<<"\n";
}
}
ONPU3