Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Secret{
- public:
- Secret(int k){
- a = rand();
- b = k ^ a;
- }
- Secret(const Secret& secret){
- a = rand();
- b = secret.get() ^ k;
- }
- int get(){
- return a ^ b;
- }
- private:
- int a, b;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement