Internet Problem Solving Contest

IPSC 2013

Problem C – Code Inception

In each subproblem of this task you are given a piece of code. Ultimately, the code produces (somehow, somewhen) a single readable English word.

Problem specification

Your only goal: recover the word.

And remember: you may need to go deeper.

Input specification

For each subproblem, you are given two files, each containing the same program, written in a different language. (One is in C++, the other in Python3. We did our best to make the programs as similar to each other as possible.) Each program produces the same single English word.

Difficulty is subjective. You may find subproblem C2 easier to solve than C1. But solving C1 is still worth 1 point and solving C2 is worth 2, just as in the other tasks.

Output specification

Submit a text file containing the recovered word, in UPPERCASE.


for x in "olleh"[::-1]:


#include <iostream>
#include <string>
std::string s = "olleh";
int main() {
    for (auto c=s.rbegin();
            std::cout << *c;

Note that the answer is given in uppercase.