結果
| 問題 |
No.3294 UECoder
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-07 04:43:13 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 676 bytes |
| コンパイル時間 | 1,190 ms |
| コンパイル使用メモリ | 88,592 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-10-07 04:43:16 |
| 合計ジャッジ時間 | 2,849 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N, i, cnt = 3;
bool res = false;
string S;
cin >> N >> S;
vector<string> ans;
ans.push_back("U");
ans.push_back("E");
ans.push_back("C");
for (i = 0; i < N; i++) {
if (!res) {
if (S[i] == 'c') {
res = true;
}
}
else {
ans.push_back(string(1, S[i])); // 1文字をstring化
cnt += 1;
}
}
for (i = 0; i < cnt; i++) {
cout << ans[i];
}
cout << endl;
return 0;
}