Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int calc(int n){
- set<int> cur;
- fore(i, n / 2, n)
- cur.insert(gr[i]);
- fore(i, 1, (*cur.rbegin()) + 2)
- if (cur.find(i) == cur.end())
- return i;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement