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;
#define ll long long
#define ln '\n'
const int N = 2e5 + 5;
const int LG = 20;
const int INF = 2e9 + 5;
const int MOD = 998244353;
vector<int> s;
int n;
void init(){
cin >> n;
s.resize(2*n);
for (int i = 0; i < 2*n; i++) cin >> s[i];
}
ll solve(vector<int>& s){
n = s.size() / 2;
return 1LL * (n-1) * (n) / 2;
}
long long count_swaps(std::vector<int> s) {
return solve(s);
}
# | 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... |