b2b.cpp: In function ‘bool trial(double)’:
b2b.cpp:18:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
auto *pt = max_element(tmp,tmp+n);
^
b2b.cpp:18:11: error: ISO C++ forbids declaration of ‘pt’ with no type [-fpermissive]
auto *pt = max_element(tmp,tmp+n);
^
b2b.cpp:18:37: error: cannot convert ‘double*’ to ‘int*’ in initialization
auto *pt = max_element(tmp,tmp+n);
^
b2b.cpp:20:21: error: invalid operands of types ‘int*’ and ‘double [100005]’ to binary ‘operator-’
r1 = (int)(pt - tmp) + 1;
^
b2b.cpp:21:9: warning: overflow in implicit constant conversion [-Woverflow]
*pt = -1e18;
^
b2b.cpp:22:8: error: cannot convert ‘double*’ to ‘int*’ in assignment
pt = max_element(tmp,tmp+n);
^
b2b.cpp:24:21: error: invalid operands of types ‘int*’ and ‘double [100005]’ to binary ‘operator-’
r2 = (int)(pt - tmp) + 1;
^
b2b.cpp: In function ‘int main()’:
b2b.cpp:29:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^
b2b.cpp:31:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&h[i]);
^
b2b.cpp:35:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&u[i]);
^