Submission #284021

#TimeUsernameProblemLanguageResultExecution timeMemory
284021AMnuBubble Sort 2 (JOI18_bubblesort2)C++14
38 / 100
9069 ms1792 KiB
#include "bubblesort2.h" #include <bits/stdc++.h> #define pii pair<int,int> #define i1 first #define i2 second 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> H(Q); vector<pii> S(N); for (int i=0;i<Q;i++) { A[X[i]]=V[i]; for (int j=0;j<N;j++) { S[j]={A[j],j}; } sort(S.begin(),S.end()); for (int j=0;j<N;j++) { H[i]=max(H[i],S[j].i2-j); } } return H; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...