#include "testlib.h" std::set colours { "RED", "ORANGE", "YELLOW", "GREEN", "BLUE", "VIOLET" }; int main(int argc, char *argv[]) { setName("Validator for 'Colourful Captcha'"); registerValidation(argc, argv); std::string colour_big = inf.readLine(); if (colours.find(colour_big) == colours.end()) { quitf(_wa, "First line is not a valid colour"); } std::string colour_small = inf.readLine(); if (colours.find(colour_small) == colours.end()) { quitf(_wa, "Second line is not a valid colour"); } if (colour_big == colour_small) { quitf(_wa, "Both colours are the same"); } inf.readEof(); return 42; }