运行 ID: 41305

Main.cc: In function ‘int main()’:
Main.cc:11:22: error: ‘cnt’ was not declared in this scope
         if(n%2==1) a[cnt++]=n;
                      ^~~
Main.cc:11:22: note: suggested alternative: ‘cnt2’
         if(n%2==1) a[cnt++]=n;
                      ^~~
                      cnt2
Main.cc:14:14: error: ‘cnt’ was not declared in this scope
     sort(a,a+cnt,cmp);
              ^~~
Main.cc:14:14: note: suggested alternative: ‘cnt2’
     sort(a,a+cnt,cmp);
              ^~~
              cnt2
Main.cc:19:19: warning: for increment expression has no effect [-Wunused-value]
     for(int i=0;;i