1 | extern "C" int printf(const char*, ...); |
2 | extern const char* question(); |
3 | |
4 | inline int answer() __attribute__((always_inline)); |
5 | inline int answer() { return 42; } |
6 | |
7 | int main(int argc, char *argv[]) { |
8 | int ans; |
9 | if (argc == 1) { |
10 | ans = 0; |
11 | } else { |
12 | ans = argc; |
13 | } |
14 | printf("%s\n" , question()); |
15 | for (int i = 0; i < 10; ++i) { |
16 | int x = answer(); |
17 | int y = answer(); |
18 | ans += x - y; |
19 | } |
20 | // padding to make sure question() is inlineable |
21 | asm("nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;" ); |
22 | return ans; |
23 | } |
24 | |