Advertisement
GerONSo

Untitled

Sep 12th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. for(auto it1 = st.rbegin(); it1 != st.rend(); it1--) {
  2. for(auto it2 = st.begin(); it2 != st.end(); it2++) {
  3. if(*it1 == *it2) {
  4. break;
  5. }
  6. if(st.count(abs(*it1 - *it2)) == 0) {
  7. ok = 1;
  8. st.insert(*it1 - *it2);
  9. // cerr << *it1 - *it2 << '\n';
  10. f = 1;
  11. ans ^= 1;
  12. break;
  13. }
  14. }
  15. if(f) break;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement