# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
535433 | mario05092929 | 고대 책들 (IOI17_books) | C++14 | 187 ms | 24164 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "books.h"
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
const int INF = 1e9;
typedef long long ll;
typedef pair <int,int> pi;
typedef vector <int> vec;
using namespace std;
vec a;
int n;
int c[1000005],mn,mx;
vector <pi> line;
void dfs(int x) {
if(c[x]) return;
c[x] = 1;
mn = min(mn,x);
mx = max(mx,x);
dfs(a[x]);
}
ll minimum_walk(vec P,int st) {
ll ans = 0;
a = P;
n = a.size();
line.push_back({0,0});
for(int i = 0;i < n;i++) {
ans += abs(i-a[i]);
# | 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... |