# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
994062 | TgX_2 | Arranging Shoes (IOI19_shoes) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int count_swaps(vector<int> s) {
int cnt = 0;
int n = s.size();
for(int i = 0; i < n; i++) {
if (i & 1 and a[i] < 0) cnt++;
else if (i % 2 == 0 and a[i] > 0) cnt++;
}
return cnt;
}