parentrises.cpp: In function 'void solve1()':
parentrises.cpp:59:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
return 0;
^
parentrises.cpp: At global scope:
parentrises.cpp:75:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main() {
^
parentrises.cpp: In function 'void solve2()':
parentrises.cpp:71:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
parentrises.cpp: In function 'int main()':
parentrises.cpp:77:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &p);
~~~~~^~~~~~~~~~
parentrises.cpp:79:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &test);
~~~~~^~~~~~~~~~~~~