# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
163901 | 2019-11-16T06:44:03 Z | oolimry | Bubble Sort 2 (JOI18_bubblesort2) | C++14 | 2934 ms | 840 KB |
#include "bubblesort2.h" #include <bits/stdc++.h> using namespace std; vector<int> countScans(vector<int> arr, vector<int> X, vector<int> V){ int q = X.size(); int n = arr.size(); vector<int> answer; for(int i = 0;i < n;i++){ arr[i] *= -1; } for(int qq = 0;qq < q;qq++){ arr[X[qq]] = V[qq] * -1; vector<int> L; for(int i = 0;i < n;i++){ int a = arr[i]; int index = lower_bound(L.begin(), L.end(),a) - L.begin(); if(index == L.size()){ L.push_back(a); continue; } L[index] = a; } answer.push_back(L.size()); } return answer; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2934 ms | 840 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |