sparklers.cpp: In function 'll transformm(std::vector<int>&, std::vector<std::pair<long long int, long long int> >&)':
sparklers.cpp:38:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(i<v.size() && v[i] > 0) sum += v[i++];
~^~~~~~~~~
sparklers.cpp:43:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(; i<v.size(); )
~^~~~~~~~~
sparklers.cpp:46:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(i < v.size() && v[i] <= 0) K += v[i++];
~~^~~~~~~~~~
sparklers.cpp:48:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(i < v.size() && v[i] > 0) Q += v[i++];
~~^~~~~~~~~~
sparklers.cpp: In function 'void Merge(std::vector<std::pair<long long int, long long int> >&, std::vector<std::pair<long long int, long long int> >&, std::vector<std::pair<long long int, long long int> >&)':
sparklers.cpp:64:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(i < a.size() && (j == b.size() || a[i] < b[j]))
~~^~~~~~~~~~
sparklers.cpp:64:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(i < a.size() && (j == b.size() || a[i] < b[j]))
~~^~~~~~~~~~~
sparklers.cpp: In function 'bool check(int)':
sparklers.cpp:77:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(i=1; i<K; ++i) A.push_back(2 * S * T - (X[i+1] - X[i])); reverse(A.begin(), A.end());
^~~
sparklers.cpp:77:66: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
for(i=1; i<K; ++i) A.push_back(2 * S * T - (X[i+1] - X[i])); reverse(A.begin(), A.end());
^~~~~~~