Hey, it's been a while since I last wrote, and I did it. I finished a DIV 3 A question. It was the easiest question in the whole round, but I still feel proud of myself. The question was Codeforces Round 1043 (Div. 3) 2132A - Homework. This is my code (100% not ai):
#include <iostream>
#include <string>
using namespace std;
int main() {
int testcases;
cin >> testcases;
for (int i = 1; i <= testcases; i++) {
int centralLetterCount, addedLetterCount;
string centralLetters, addedLetters, order;
cin >> centralLetterCount >> centralLetters;
cin >> addedLetterCount >> addedLetters;
cin >> order;
string finalResults=centralLetters;
int index = 0;
for (int j = 0; j < order.length(); j++) {
if (order[j] == 'V') {
finalResults = addedLetters[index] + finalResults;
index += 1;
} else if (order[j] == 'D') {
finalResults += addedLetters[index];
index += 1;
} else if (index >= addedLetterCount) {
cout << "Error: order length larger than added letters amount\n";
break;
} else {
cout << "Error: unexpected character in order string\n";
break;
}
}
cout << finalResults << '\n';
}
return 0;
}







