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:31: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);
~~~~~^~~~~~~~~~~
carnival.cpp:63:22: warning: 'mid' may be used uninitialized in this function [-Wmaybe-uninitialized]
chk[a[mid]]=c;
^