paint.cpp: In function 'int fr(int)':
paint.cpp:28:15: error: 'n' was not declared in this scope
28 | if(u==n)return u;
| ^
paint.cpp: At global scope:
paint.cpp:69:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
69 | main()
| ^
paint.cpp: In function 'void solve()':
paint.cpp:45:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
45 | scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~~~~
paint.cpp:55:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
55 | scanf("%d",&i);
| ~~~~~^~~~~~~~~
paint.cpp:56:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
56 | scanf("%d",&i);
| ~~~~~^~~~~~~~~
paint.cpp:57:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
57 | scanf("%d",&c);
| ~~~~~^~~~~~~~~