Guest User

Untitled

a guest
Oct 21st, 2017
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<string>
  2. #define F r.find(
  3. #define S+b[i]);if(p!=size_t(-1)){b.replace(i,1,r.substr(p
  4. #define T p)-p-2));r.replace(p+1,F'/',p+1)-p,"");
  5. using s=std::string;using p=std::pair<int,int>;s m(s a){s r="/a@/b8/c(/d6/e3/f#/g9/h#/i1//i!/k</l1//li/o0/q9/s5//s$/t+/v>/wuu//w2u/x%/y?/";s b;int c=1,i=0;for(;i<a.size();++i){for(;a[i]==a[i+1]&&i<a.size()-1;c++,++i);b+=(c-1?std::to_string(c):"")+a[i];c=1;}for(i=0;i<b.size();++i){auto p=F s("/")S+2,F'/',1+T}else{p=F s("//")S+3,F'/',2+T}}}return b;}
RAW Paste Data