beads.cpp: In function 'void dfs(int)':
beads.cpp:14:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i=0;i<from[x].size();i++) {
~^~~~~~~~~~~~~~~
beads.cpp: At global scope:
beads.cpp:27:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main() {
^
beads.cpp: In function 'int main()':
beads.cpp:38:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(now=0;now<p.size();now++) {
~~~^~~~~~~~~
beads.cpp:43:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i=0;i<from[x].size();i++) {
~^~~~~~~~~~~~~~~
beads.cpp:30:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
beads.cpp:32:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%lld",&x,&y,&val);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~