bridges.cpp: In function 'void rollback(int)':
bridges.cpp:29:18: warning: comparison of integer expressions of different signedness: 'std::stack<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
29 | while(stk.size()>x)
| ~~~~~~~~~~^~
bridges.cpp: In function 'int main()':
bridges.cpp:91:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
91 | while(idx<unchanged.size()&&W[unchanged[idx]]>=Y[i])
| ~~~^~~~~~~~~~~~~~~~~
bridges.cpp:47:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
47 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~
bridges.cpp:49:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
49 | scanf("%d%d%d",&A[i],&B[i],&W[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
bridges.cpp:50:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
50 | scanf("%d",&q);
| ~~~~~^~~~~~~~~
bridges.cpp:52:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
52 | scanf("%d%d%d",&op[i],&X[i],&Y[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~