2020-08-13 07:07:32 +08:00
|
|
|
#include <cstddef>
|
|
|
|
|
2020-09-26 18:47:20 +08:00
|
|
|
extern int regression_1000();
|
2020-11-20 05:42:02 +08:00
|
|
|
extern int regression_1008();
|
|
|
|
extern int regression_1067();
|
2020-12-18 12:25:48 +08:00
|
|
|
extern int regression_1072();
|
2020-12-18 12:37:00 +08:00
|
|
|
extern int regression_1087();
|
2020-12-18 12:25:48 +08:00
|
|
|
|
|
|
|
using f_ptr = int();
|
|
|
|
|
|
|
|
int trampoline(f_ptr* f) {
|
|
|
|
try {
|
|
|
|
return f();
|
|
|
|
}
|
|
|
|
catch (...) {
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
2020-08-13 07:07:32 +08:00
|
|
|
|
|
|
|
int main(int, char*[]) {
|
2020-12-18 12:37:00 +08:00
|
|
|
f_ptr* regressions[] = { ®ression_1008, ®ression_1000, ®ression_1067, ®ression_1072, ®ression_1087 };
|
2020-08-13 07:07:32 +08:00
|
|
|
const int sizeof_regressions = sizeof(regressions) / sizeof(regressions[0]);
|
|
|
|
int r = 0;
|
|
|
|
for (std::size_t i = 0; i < sizeof_regressions; ++i) {
|
2020-12-18 12:25:48 +08:00
|
|
|
f_ptr* f = regressions[i];
|
|
|
|
r += static_cast<int>(trampoline(f) != 0);
|
2020-08-13 07:07:32 +08:00
|
|
|
}
|
|
|
|
return r;
|
|
|
|
}
|