Submission #1242578

#TimeUsernameProblemLanguageResultExecution timeMemory
1242578mohamedboukerche55Arranging Shoes (IOI19_shoes)C++20
45 / 100
14 ms1968 KiB
#include<bits/stdc++.h> #include "shoes.h" using ll = long long ; using namespace std; long long count_swaps(std::vector<int> s) { ll n = s.size()/2; ll l = 0, p = 0; for (ll i = 0; i < 2 * n; i++) { if (s[i] < 0) { l += abs(i - p); p += 2; } } return l; }
#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...