Submission #363324

#TimeUsernameProblemLanguageResultExecution timeMemory
363324buyolitsezBubble Sort 2 (JOI18_bubblesort2)C++17
0 / 100
9064 ms700 KiB
#include "bubblesort2.h" #include <bits/stdc++.h> using namespace std; //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") //#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") std::vector<int> countScans(std::vector<int> a,std::vector<int> x,std::vector<int> v){ int n = a.size(), q = x.size(); vector <int> s(q, n - 1); for(int f = 0; f < q; ++f) { int mx = 0; for (int i = 0; i < n; ++i) { int cnt = 0; for (int j = i + 1; j < n; ++j) { if (a[j] < a[i]) { ++cnt; } } mx = max(mx, cnt); } s[f] = mx; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...