#include "shoes.h"
#include <vector>
#include <algorithm>
using namespace std;
long long total = 0;
bool comp(const int a, const int b) {
total++;
if(abs(a)==abs(b)) return a<b;
return abs(a) < abs(b);
}
long long count_swaps(std::vector<int> s) {
sort(s.begin(),s.end(),comp);
return total;
}
# | 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... |