Submission #408874

#TimeUsernameProblemLanguageResultExecution timeMemory
408874dooweyBubble Sort 2 (JOI18_bubblesort2)C++14
38 / 100
9018 ms2196 KiB
#include <bits/stdc++.h> #include "bubblesort2.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; #define fi first #define se second #define mp make_pair vector<int> countScans(vector<int> A, vector<int> X, vector<int> V){ vector<int> outp; int n = A.size(); int q = X.size(); int sol; for(int iq = 0; iq < q; iq ++ ){ A[X[iq]] = V[iq]; vector<pii> cha; sol = 0; for(int i = 0 ; i < n; i ++ ){ cha.push_back(mp(A[i], i)); } sort(cha.begin(), cha.end()); for(int i = 0 ; i < n; i ++ ){ sol = max(sol, cha[i].se - i); } outp.push_back(sol); } return outp; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...