#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <iterator>
int main()
{
std::vector<int> v1;
for (int i = 0; i < 100; i++) v1.push_back(i);
std::vector<int> v2;
std::vector<int> v3;
bool toggle = false;
std::partition_copy(v1.begin(),
v1.end(),
std::back_inserter(v2),
std::back_inserter(v3),
[&toggle](int) { return toggle = !toggle; });
std::cout << v2.size() << "\n";
std::cout << v3.size() << "\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8aXRlcmF0b3I+CgppbnQgbWFpbigpCnsKICAgIHN0ZDo6dmVjdG9yPGludD4gdjE7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IDEwMDsgaSsrKSB2MS5wdXNoX2JhY2soaSk7CgogICAgc3RkOjp2ZWN0b3I8aW50PiB2MjsKICAgIHN0ZDo6dmVjdG9yPGludD4gdjM7CgogICAgYm9vbCB0b2dnbGUgPSBmYWxzZTsKICAgIHN0ZDo6cGFydGl0aW9uX2NvcHkodjEuYmVnaW4oKSwKICAgICAgICAgICAgICAgICAgICAgICAgdjEuZW5kKCksCiAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6YmFja19pbnNlcnRlcih2MiksCiAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6YmFja19pbnNlcnRlcih2MyksCiAgICAgICAgICAgICAgICAgICAgICAgIFsmdG9nZ2xlXShpbnQpIHsgcmV0dXJuIHRvZ2dsZSA9ICF0b2dnbGU7IH0pOwoKICAgIHN0ZDo6Y291dCA8PCB2Mi5zaXplKCkgPDwgIlxuIjsKICAgIHN0ZDo6Y291dCA8PCB2My5zaXplKCkgPDwgIlxuIjsKCiAgICByZXR1cm4gMDsKfQo=