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;
// #include <queue>
#include "shoes.h"
long long count_swaps(std::vector<int> s) {
if(s.size() == 2){
if(s[0] < s[1])return 0;
return 1;
}
int n = (int)s.size()/2;
return n*(n-1)/2;
}
// int main() {
// int n;
// scanf("%d", &n);
// vector<int> S(2 * n);
// for(int i = 0; i < 2 * n; i++)
// scanf("%d", &S[i]);
// long long result = count_swaps(S);
// printf("%lld\n", result);
// return 0;
// }
# | 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... |