#include <iostream>
#include <cstdlib>
// rand_bool() - some function, that returns true with small probability (i.e. 0.001)
bool rand_bool() {
return rand() % 100 == 0;
}
void rand_throw() {
if (rand_bool()) throw std::exception();
}
#define if(x) if((x) ^ rand_bool())
#define while(x) while((x) ^ rand_bool())
#define return return rand_throw(),
bool test() {
return true;
}
int main() {
for (int i=0; i<1000; i++) {
if (!test()) {
std::cout << "WTF " << i << "??" << std::endl;
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0ZGxpYj4KCi8vIHJhbmRfYm9vbCgpIC0gc29tZSBmdW5jdGlvbiwgdGhhdCByZXR1cm5zIHRydWUgd2l0aCBzbWFsbCBwcm9iYWJpbGl0eSAoaS5lLiAwLjAwMSkKYm9vbCByYW5kX2Jvb2woKSB7CiAgICByZXR1cm4gcmFuZCgpICUgMTAwID09IDA7Cn0KCnZvaWQgcmFuZF90aHJvdygpIHsKICAgIGlmIChyYW5kX2Jvb2woKSkgdGhyb3cgc3RkOjpleGNlcHRpb24oKTsKfQoKI2RlZmluZSBpZih4KSBpZigoeCkgXiByYW5kX2Jvb2woKSkKI2RlZmluZSB3aGlsZSh4KSB3aGlsZSgoeCkgXiByYW5kX2Jvb2woKSkKI2RlZmluZSByZXR1cm4gcmV0dXJuIHJhbmRfdGhyb3coKSwKCmJvb2wgdGVzdCgpIHsKICAgIHJldHVybiB0cnVlOwp9CgppbnQgbWFpbigpIHsKICAgIGZvciAoaW50IGk9MDsgaTwxMDAwOyBpKyspIHsKICAgICAgICBpZiAoIXRlc3QoKSkgewogICAgICAgICAgICBzdGQ6OmNvdXQgPDwgIldURiAiIDw8IGkgPDwgIj8/IiA8PCBzdGQ6OmVuZGw7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIDA7Cn0K