diff --git a/POJ/3617.cpp b/POJ/3617.cpp new file mode 100644 index 0000000..4339240 --- /dev/null +++ b/POJ/3617.cpp @@ -0,0 +1,150 @@ +#include +#include +#include +#include +using namespace std; + +vector S; + +bool operator < (vector& a,vector& b) +{ + int maxsize=a.size()>b.size()?a.size():b.size(); + for(int i=0;ib.at(i)) + { + return false; + } + else if(a.at(i) (vector& a,vector& b) +{ + int maxsize=a.size()>b.size()?a.size():b.size(); + for(int i=0;ib.at(i)) + { + return true; + } + else if(a.at(i)b.size(); +} + +bool operator == (vector& a,vector& b) +{ + if(a.size()!=b.size()) + { + return false; + } + int maxsize=a.size(); + for(int i=0;iXS[R]) + { + printf("%c",XS[R]); + R--; + } + else + { + /// XS[L] == XS[R] + bool check=false; + for(int i=1;iXS[R-i]) + { + check=true; + printf("%c",XS[R]); + R--; + break; + } + } + if(!check) + { + printf("%c",XS[L]); + L++; + } + } + cnt++; + if(cnt==80) + { + printf("\n"); + cnt=0; + } + } + printf("\n"); + return 0; +}