carnival.cpp: In function 'int main()':
carnival.cpp:19:13: warning: unused variable 'l' [-Wunused-variable]
int l=0;int r=a.size()-1;
^
carnival.cpp:19:21: warning: unused variable 'r' [-Wunused-variable]
int l=0;int r=a.size()-1;
^
carnival.cpp:20:13: warning: unused variable 'mid' [-Wunused-variable]
int mid;
^~~
carnival.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
carnival.cpp:30:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &c);
~~~~~^~~~~~~~~~
carnival.cpp:57:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &nc);
~~~~~^~~~~~~~~~~