Submission #1135175

#TimeUsernameProblemLanguageResultExecution timeMemory
1135175lopkusBubble Sort 2 (JOI18_bubblesort2)C++20
0 / 100
9091 ms656 KiB
#include <bits/stdc++.h> #include "bubblesort2.h" using namespace std; vector<int> countScans(vector<int> a,vector<int> X,vector<int> V){ int n = a.size(); int q = X.size(); vector<int> answer(q); for(int i = 0; i < q; i++) { a[X[i]] = V[i]; int ans = 0; for(int j = 0; j < n; j++) { for(int k = j + 1; k < n; k++) { if(a[j] > a[k]) { ans += 1; } } } answer[i] = ans; } return answer; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...