| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 1274974 | rafsanamin2020 | Arranging Shoes (IOI19_shoes) | C++20 | 0 ms | 0 KiB | 
#include <bits/stdc++.h>
#include "shoes.h"
long long count_swaps(std::vector<int> s)
{
	int N = s.size(), p = 0, n = 0;
	for (int i = 0; i < N; i += 2)
	{
		if (s[i] > 0)
		{
			p++;
		}
		else if (s[i + 1] < 0)
		{
			n++;
		}
	}
	return max(p, n);
}
