제출 #1311370

#제출 시각아이디문제언어결과실행 시간메모리
1311370aleksandreArranging Shoes (IOI19_shoes)C++20
10 / 100
1 ms344 KiB
#include "shoes.h" #include <bits/stdc++.h> using namespace std; long long count_swaps(std::vector<int> s) { long long swaps = 0; int n = s.size(); for (int i = 0; i < n; i++) { for (int j = 0; j < n - i - 1; j++) { if (s[j] > s[j + 1]) { swap(s[j], s[j + 1]); swaps++; } } } 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...