Submission #713427

#TimeUsernameProblemLanguageResultExecution timeMemory
713427europiumArranging Shoes (IOI19_shoes)C++17
0 / 100
0 ms212 KiB
#include "shoes.h" #include <iostream> #include <vector> #include <algorithm> #include <string> #include <numeric> #include <cmath> #include<iterator> #include <set> #include <map> #include <math.h> #include <iomanip> #include <unordered_set> using namespace std; using ll = long long; // subtask 4 // ll count_swaps(vector<int> s) { // ll n = s.size() / 2; // return n * (n - 1) / 2; // } // subtask 3 ll count_swaps(vector<int> s) { int closest = 0; int ans = 0; for (auto e : s){ if (e < 0){ ans += abs(e - closest); closest += 2; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...