답안 #901395

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
901395 2024-01-09T11:35:23 Z nxteru 고대 책들 (IOI17_books) C++14
0 / 100
1 ms 436 KB
#include <bits/stdc++.h>
using namespace std;
using ll =long long;
int minimum_walk(vector<int>p, int s){
	int n=p.size();
	ll ans=0;
	int ma=0;
	for(int i=0;i<n;i++){
		ans+=abs(p[i]-i);
		ma=max(ma,p[i]);
		if(ma<=i&&i<n-1)ans+=2;
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 436 KB Output is correct
4 Correct 1 ms 436 KB Output is correct
5 Incorrect 0 ms 344 KB 3rd lines differ - on the 1st token, expected: '4', found: '6'
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 436 KB Output is correct
4 Correct 1 ms 436 KB Output is correct
5 Incorrect 0 ms 344 KB 3rd lines differ - on the 1st token, expected: '4', found: '6'
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 436 KB Output is correct
4 Correct 1 ms 436 KB Output is correct
5 Incorrect 0 ms 344 KB 3rd lines differ - on the 1st token, expected: '4', found: '6'
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 3rd lines differ - on the 1st token, expected: '3304', found: '2744'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 436 KB Output is correct
4 Correct 1 ms 436 KB Output is correct
5 Incorrect 0 ms 344 KB 3rd lines differ - on the 1st token, expected: '4', found: '6'
6 Halted 0 ms 0 KB -