| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1357177 | nathlol2 | Bubble Sort 2 (JOI18_bubblesort2) | C++20 | 9087 ms | 2028 KiB |
#include "bubblesort2.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> countScans(vector<int> A, vector<int> X, vector<int> V){
int n = A.size(), q = X.size();
vector<int> ans(q);
for(int i = 0;i<q;i++){
A[X[i]] = V[i];
int mx = 0;
vector<pair<int, int>> t;
for(int i = 0;i<n;i++) t.push_back({A[i], i});
sort(t.begin(), t.end());
for(int i = 0;i<n;i++) mx = max(mx, t[i].second - i);
ans[i] = mx;
}
return ans;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
