Problem hammeringnails
User AndyChen
Submission Time 2026-11-04 11:54:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hammeringnails.cpp: In function ‘int main()’:
hammeringnails.cpp:6:18: error: expected ‘;’ before ‘long’
6 | cin.tie(NULL)
| ^
| ;
hammeringnails.cpp:9:12: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
9 | cin >> n;
| ^
| yn
hammeringnails.cpp:15:13: error: ‘down’ was not declared in this scope
15 | down = 1;
| ^~~~
hammeringnails.cpp:19:13: error: ‘up’ was not declared in this scope
19 | up = 1;
| ^~
hammeringnails.cpp:25:17: error: ‘up’ was not declared in this scope
25 | if (up == 1 && a[i] < number){
| ^~
hammeringnails.cpp:29:22: error: ‘down’ was not declared in this scope
29 | else if (down == 1 && a[i] > number){
| ^~~~
hammeringnails.cpp:45:17: error: