drvca.cpp: In function 'bool solve(int, int)':
drvca.cpp:51:30: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::set<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("%d\n", A.size() - 1);
~~~~~~~~~~~~^
drvca.cpp:53:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (auto iter = A.begin(); ++cnt < A.size(); ++iter)
~~~~~~^~~~~~~~~~
drvca.cpp:59:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::set<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("%d\n", A.size());
~~~~~~~~^
drvca.cpp:74:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::set<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("%d\n", A.size());
~~~~~~~~^
drvca.cpp:77:28: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::set<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("\n%d\n", B.size());
~~~~~~~~^
drvca.cpp: In function 'int main()':
drvca.cpp:85:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
drvca.cpp:86:35: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
~~~~~^~~~~~~~~~~~~~~