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 "shoes.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll count_swaps(vector<int> s)
{
ll n = s.size() / 2;
if(n == 1)
return s[0] > 0;
int iseq = 1;
for(int i=0;i<n;i++)
if(s[i] + s[i + n] != 0)
{
iseq = 0;
break;
}
if(iseq)
return n * (n - 1) / 2;
return n;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |