# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
143658 | mosesmayer | Arranging Shoes (IOI19_shoes) | C++17 | 262 ms | 122920 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "shoes.h"
#include <bits/stdc++.h>
using namespace std;
const int mxsz = 1e5 + 5;
const int MX = 2e5;
int n;
deque<int> dq[mxsz];
int match[MX + 5];
bool done[MX + 5];
long long ans = 0, invcnt = 0;
struct FenwickTree{
int ft[MX + 5];
FenwickTree(){}
void upd(int p, int v){
for (; p <= MX; p += p & -p) ft[p] += v;
}
int get(int p){
int ret = 0;
for (; p > 0; p -= p & -p) ret += ft[p];
return ret;
}
} ft;
long long count_swaps(std::vector<int> s) {
n = s.size(); n >>= 1;
for (int i = 0; i < 2 * n; i++){
int u = abs(s[i]);
if (s[i] < 0){
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |