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 <iostream>
#include <vector>
using namespace std;
long long count_swaps(vector<int> s){
int N = s.size();
vector <int> negativos;
for(int i = 0; i < N; i++){
if(s[i] < 0) negativos.push_back(i);
}
int res = 0;
for(int i = 0; i < N; i = i+2){
res += s[i/2] - i;
}
return res;
}
# | 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... |