Submission #1254124

#TimeUsernameProblemLanguageResultExecution timeMemory
1254124chikien2009Bubble Sort 2 (JOI18_bubblesort2)C++20
0 / 100
55 ms580 KiB
#include <bits/stdc++.h> #include "bubblesort2.h" // using namespace std; // void setup() // { // #ifndef ONLINE_JUDGE // freopen("test.inp", "r", stdin); // freopen("test.out", "w", stdout); // #endif // ios_base::sync_with_stdio(0); // cin.tie(0); // cout.tie(0); // } std::vector<int> countScans(std::vector<int> A,std::vector<int> X,std::vector<int> V) { std::vector<int> res; res.resize(X.size()); int mn = 2e9; for (int i = 0; i < X.size(); ++i) { A[X[i]] = V[i]; mn = 2e9; for (int j = A.size() - 1; j >= 0; --j) { res[i] += (A[j] > mn); mn = std::min(mn, A[j]); } } return res; } // int main() // { // setup(); // return 0; // }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...