| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 496061 | 600Mihnea | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 9035 ms | 2744 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bubblesort2.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<int> innterCountScans(vector<ll> a, vector<int> pos, vector<ll> value) {
int n = (int) a.size();
int q = (int) pos.size();
for (int i = 0; i < n; i++) {
a[i] = a[i] * (ll) (n + 1) + i;
}
assert(q == (int) value.size());
for (int it = 0; it < q; it++) {
value[it] = value[it] * (ll) (n + 1) + pos[it];
}
vector<int> sol;
for (int it = 0; it < q; it++) {
a[pos[it]] = value[it];
map<ll, int> mp;
for (auto &x : a) {
mp[x] = 0;
}
{
int ij = 0;
for (auto &it : mp) {
it.second = ++ij;
}
}
ll MN = a[n - 1];
int MX = 0;
for (int i = 0; i < n; i++) {
MX = max(MX, i - mp[a[i]]);
}
sol.push_back(MX + 1);
}
return sol;
}
vector<int> countScans(vector<int> a, vector<int> b, vector<int> c) {
vector<ll> X, Z;
for (auto &it : a) {
X.push_back(it);
}
for (auto &it : c) {
Z.push_back(it);
}
return innterCountScans(X, b, Z);
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
