Guest User

Untitled

a guest
Jan 15th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. struct BigInt{
  2.     vector<unsigned char> d;
  3.  
  4.     inline const unsigned char D(int ind){
  5.         return ind>=d.size()?0:d[ind];
  6.     }
  7.  
  8.     const BigInt operator+ (const BigInt &other){
  9.         BigInt ans;
  10.         int stop=max(other.d.size(), d.size())+1;
  11.         unsigned char carry=0;
  12.         for(int i=0; i < stop; ++i){
  13.             if(D(i) > 255-carry || 255-carry-D(i) < other.D(i))
  14.         }
  15.     }
  16. }
Add Comment
Please, Sign In to add comment