Submission #124373

# Submission time Handle Problem Language Result Execution time Memory
124373 2019-07-03T08:47:12 Z vex Ancient Books (IOI17_books) C++14
0 / 100
2 ms 376 KB
#include <bits/stdc++.h>
#include "books.h"
#define maxn 1000005
using namespace std;

long long minimum_walk(vector<int>p, int s)
{
	int n=p.size();
	long long sol=n-1;
	
	for(int i=0;i<n;i++)
	{
		sol+=abs(i-p[i]);
	}
	
	return sol;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB 3rd lines differ - on the 1st token, expected: '6', found: '7'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB 3rd lines differ - on the 1st token, expected: '6', found: '7'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB 3rd lines differ - on the 1st token, expected: '6', found: '7'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB 3rd lines differ - on the 1st token, expected: '3304', found: '3743'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB 3rd lines differ - on the 1st token, expected: '6', found: '7'
2 Halted 0 ms 0 KB -