Submission #440324

#TimeUsernameProblemLanguageResultExecution timeMemory
440324IdkwhoamiArranging Shoes (IOI19_shoes)C++17
10 / 100
27 ms3504 KiB
#include "bits/stdc++.h" using namespace std; int count_swaps(vector<int> v) { int n = v.size(); if(n == 2){ return (v[0] < v[1] ? 0 : 1); } vector<int> e(n/2); int ans = 0, k = 0; for(int i = 0;i<n;i++){ if(v[i] < 0){ ans += abs(i - k); k += 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...