Solution: Macroeconomics
Answer: CARDINAL
Written by Kenny Young
The $ signs can be replaced with:
#define a set
#define n c ## math
#define v typeinfo
#define d vector
#define b short
#define c sizeof
#define e template
#define f int
#define g class
#define h erase
#define i at
#define j public
#define k begin
#define l else
#define m if
#define o find
#define p do
#define q std
#define r insert
#define s for
#define t while
#define u name
#define w size
#define x void
#define y end
#define z typeid
#define B return
#define C sqrt
#define D printf
#define E unsigned
#define F char
#define G main
#define H auto
#define I long
so the code expands to:
#include <cstdio>
#include <set>
#include <cmath>
#include <typeinfo>
#include <vector>
class Helper
{
public:
template<class T>
void RemoveDups(std::vector<T>& v)
{
// remove duplicates
std::set<T> seen;
unsigned int x = 0;
do
{
T y = v.at(x);
if (seen.find(y) != seen.end())
{
v.erase(v.begin() + x);
}
else
{
seen.insert(y);
x++;
}
} while (x < v.size());
}
};
int main()
{
std::vector<int> nums = { 25, 18, 25, 9, 3, 6, 18, 20, 17, 26, 4, 9, 22, 14, 2, 3, 1, 5, 3, 5, 6, 23, 3 };
Helper h;
h.RemoveDups(nums);
// s == 'v' in MSVC and gcc
char s = *(typeid(void).name());
// output nonsquares shifted
if (sizeof(char) < sizeof(unsigned short int) && sizeof(unsigned short int) <= sizeof(unsigned long int))
{
int count = 0;
for (auto it = nums.begin(); it != nums.end(); it++)
{
// skip squares
if (((int)sqrt(*it) * (int)sqrt(*it)) != *it)
{
printf("%c ", ((*it + (unsigned int)s - 'a') % 26) + 'a');
count++;
}
s++;
}
printf("(%d%)\n", count - 3);
}
return 0;
}
Compiling and running that code prints this result:
o b f u s c a t i n g (8)
If you replace each letter with the keyword it represents, you get this phrase:
find short int name for sizeof set while at math class (8)
In mathematics, the size of a set is its cardinal number, also known as its cardinality. The shorter (and 8-letter) one of these is CARDINAL.