#include <iostream>
enum class COLOR
{
Blue,
Red,
Green,
Purple,
First=Blue,
Last=Purple
};
extern const COLOR COLORS[(int)COLOR::Last+1];
const COLOR COLORS[] = {COLOR::Blue, COLOR::Red, COLOR::Green, COLOR::Purple};
std::ostream& operator<<(std::ostream& o, COLOR x) {
return o << std::underlying_type<COLOR>::type(x);
}
int main() {
for(auto c : COLORS) {
std::cout << c << '\n';
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgplbnVtIGNsYXNzIENPTE9SCnsKICAgIEJsdWUsCiAgICBSZWQsCiAgICBHcmVlbiwKICAgIFB1cnBsZSwKICAgIEZpcnN0PUJsdWUsCiAgICBMYXN0PVB1cnBsZQp9OwoKZXh0ZXJuIGNvbnN0IENPTE9SIENPTE9SU1soaW50KUNPTE9SOjpMYXN0KzFdOwpjb25zdCBDT0xPUiBDT0xPUlNbXSA9IHtDT0xPUjo6Qmx1ZSwgQ09MT1I6OlJlZCwgQ09MT1I6OkdyZWVuLCBDT0xPUjo6UHVycGxlfTsKCnN0ZDo6b3N0cmVhbSYgb3BlcmF0b3I8PChzdGQ6Om9zdHJlYW0mIG8sIENPTE9SIHgpIHsKCXJldHVybiBvIDw8IHN0ZDo6dW5kZXJseWluZ190eXBlPENPTE9SPjo6dHlwZSh4KTsKfQoKCmludCBtYWluKCkgeyAKICAgIGZvcihhdXRvIGMgOiBDT0xPUlMpIHsKICAgICAgICBzdGQ6OmNvdXQgPDwgYyA8PCAnXG4nOwogICAgfQogICAgcmV0dXJuIDA7Cn0=