S.cpp:4:11: error: ‘::main’ must return ‘int’
void main()
^
S.cpp: In function ‘int main()’:
S.cpp:43:12: error: ‘y’ was not declared in this scope
bot = k[y] + 1;
^
S.cpp: At global scope:
S.cpp:51:1: error: expected declaration before ‘}’ token
}
^
S.cpp: In function ‘int main()’:
S.cpp:15:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &N, &M, &K);
^
S.cpp:21:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &p[i]);
^
S.cpp:23:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &q[i]);
^
S.cpp:25:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &k[i]);
^