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>
using namespace std;
long long sum_to_N(long long inp) {
    long long temp = 0;
    if (inp%2 == 0) {
        temp = inp/2;
        temp *= (inp+1);
    } else {
        temp = (inp+1)/2;
        temp *= inp;
    }
    return temp;
}
long long count_swaps(std::vector<int> s) {
	
    int num = (s.size()/2-1);
    cerr << "SIZE: " << num << endl;
    return sum_to_N( (s.size()/2-1) );
}
| # | 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... |