cezar.cpp: In function 'void dfs(int)':
cezar.cpp:12:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i=0;i<from[x].size();i++) if(!vis[from[x][i]]) dfs(from[x][i]);
              ^
cezar.cpp: In function 'void dfs2(int)':
cezar.cpp:18:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i=0;i<to[x].size();i++) if(!vis[to[x][i]]) dfs2(to[x][i]);
              ^
cezar.cpp: At global scope:
cezar.cpp:20:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main() {
      ^
cezar.cpp: In function 'int main()':
cezar.cpp:28:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         while(i<p[x].size() && j<p[x+1].size()) {
                ^
cezar.cpp:28:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         while(i<p[x].size() && j<p[x+1].size()) {
                                 ^
cezar.cpp:37:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if((i==p[x].size() || j==p[x+1].size()) && p[x].size()>p[x+1].size()) {
              ^
cezar.cpp:37:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if((i==p[x].size() || j==p[x+1].size()) && p[x].size()>p[x+1].size()) {
                                ^
cezar.cpp:22:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
                   ^
cezar.cpp:24:50: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for(i=1;i<=n;i++) scanf("%d",&x), p[i] = s[x];
                                                  ^