結果
| 問題 |
No.3374 Caesar Shift Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-21 21:55:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 480 bytes |
| コンパイル時間 | 1,744 ms |
| コンパイル使用メモリ | 194,728 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2025-11-21 21:55:27 |
| 合計ジャッジ時間 | 3,699 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 21 WA * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve(){
int n;
string s;
cin >> n >> s;
for(int i = 0; i < n; i++){
if(i % 2 == 0){
if(s[i] == 'A' || s[i] == 'B') break;
s[i] = 'A';
}else{
if(s[i] == 'C') break;
s[i]++;
}
}
cout << s << '\n';
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int T;
cin >> T;
while(T--) solve();
}