cake3.cpp: In function 'void balance()':
cake3.cpp:9:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (R.size() < m) {
~~~~~~~~~^~~
cake3.cpp: In function 'void add(long long int)':
cake3.cpp:23:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (R.size() < m) { R.insert(x); allSum += x; }
~~~~~~~~~^~~
cake3.cpp: In function 'int main()':
cake3.cpp:38:15: warning: unused variable 'j' [-Wunused-variable]
long long i, j; scanf("%lld%lld", &n, &m);
^
cake3.cpp:38:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
long long i, j; scanf("%lld%lld", &n, &m);
~~~~~^~~~~~~~~~~~~~~~~~~~
cake3.cpp:39:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (i = 0; i < n; i++) scanf("%lld%lld", &a[i].v, &a[i].c);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~