foo.cpp: In function 'int main()':
foo.cpp:7:22: warning: for increment expression has no effect [-Wunused-value]
for(int i=1;i++;i<=n)
^
foo.cpp:9:13: error: 'cin' was not declared in this scope
cin>>a[i]>>b[i];
^
foo.cpp:9:13: note: suggested alternative:
In file included from foo.cpp:1:0:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^
foo.cpp:12:19: error: 'sort' was not declared in this scope
sort(w+1,w+n+1);
^
foo.cpp:12:19: note: suggested alternative:
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:62:0,
from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algo.h:4705:5: note: 'std::sort'
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^
foo.cpp:15:12: error: 'i' was not declared in this scope
ans/=b[i];
^
foo.cpp:16:5: error: 'cout' was not declared in this scope
cout<<ans<<endl;
^
foo.cpp:16:5: note: suggested alternative:
In file included from foo.cpp:1:0:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
foo.cpp:16:16: error: 'endl' was not declared in this scope
cout<<ans<<endl;
^
foo.cpp:16:16: note: suggested alternative:
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39:0,
from foo.cpp:1:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:564:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^