Submission #1311369

#TimeUsernameProblemLanguageResultExecution timeMemory
1311369aleksandreArranging Shoes (IOI19_shoes)C++20
0 / 100
1 ms336 KiB
#include "shoes.h" long long count_swaps(std::vector<int> s) { long long swaps = 0; int n = s.size(); for (int i = 0; i < n; i++) { if (s[i] < 0) { for (int j = i + 1; j < n; j++) { if (s[j] > 0) { std::swap(s[i], s[j]); swaps++; break; } } } } return swaps; }
#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...