OMGITSNANB's blog

By OMGITSNANB, history, 7 months ago, In English

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;
}

Full text and comments »

  • Vote: I like it
  • -27
  • Vote: I do not like it

By OMGITSNANB, history, 8 months ago, In English

Introduction

I'm actually just 12 years old and my school is already making me do codeforces. I have just graduated from primary school and I barely know anything about c++.

The only thing I did here on codeforces is...

I only do questions made by my school. And I can only do a few. My biggest achievment is finishing a div 4 question 2044B - Normal Problem on Codeforces Round 993 (Div. 4)

Full text and comments »

  • Vote: I like it
  • -21
  • Vote: I do not like it