Submission #1039950

#TimeUsernameProblemLanguageResultExecution timeMemory
1039950LaMatematica14Arranging Shoes (IOI19_shoes)C++17
45 / 100
14 ms3272 KiB
#include <bits/stdc++.h> using namespace std; long long count_swaps(vector<int> S) { int n = S.size(); long long tot = 0; long long att = 0; for (long long i = 0; i < n; i++) { if (S[i] < 0) { tot += abs(i-att); att += 2; } } return tot; }
#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...