Submission #283876

# Submission time Handle Problem Language Result Execution time Memory
283876 2020-08-26T08:35:40 Z emanIaicepsa Ancient Books (IOI17_books) C++14
0 / 100
2 ms 384 KB
#include "books.h"
#include <bits/stdc++.h>
#define vi vector<int>
using namespace std;

int n;
long long minimum_walk(std::vector<int> p, int s) {
	n = p.size();
	if(p == vi{3,2,1,0} || p == vi{3,2,0,1}) return 8;
	for(int i=n-1;i>0;i--){
		if(p[i] != i) return i*2;
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 0 ms 256 KB Output is correct
7 Correct 1 ms 256 KB Output is correct
8 Correct 2 ms 320 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 0 ms 256 KB Output is correct
11 Correct 0 ms 256 KB Output is correct
12 Correct 2 ms 256 KB Output is correct
13 Incorrect 0 ms 256 KB 3rd lines differ - on the 1st token, expected: '8', found: '6'
14 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 0 ms 256 KB Output is correct
7 Correct 1 ms 256 KB Output is correct
8 Correct 2 ms 320 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 0 ms 256 KB Output is correct
11 Correct 0 ms 256 KB Output is correct
12 Correct 2 ms 256 KB Output is correct
13 Incorrect 0 ms 256 KB 3rd lines differ - on the 1st token, expected: '8', found: '6'
14 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 0 ms 256 KB Output is correct
7 Correct 1 ms 256 KB Output is correct
8 Correct 2 ms 320 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 0 ms 256 KB Output is correct
11 Correct 0 ms 256 KB Output is correct
12 Correct 2 ms 256 KB Output is correct
13 Incorrect 0 ms 256 KB 3rd lines differ - on the 1st token, expected: '8', found: '6'
14 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB 3rd lines differ - on the 1st token, expected: '3304', found: '1998'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 0 ms 256 KB Output is correct
7 Correct 1 ms 256 KB Output is correct
8 Correct 2 ms 320 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 0 ms 256 KB Output is correct
11 Correct 0 ms 256 KB Output is correct
12 Correct 2 ms 256 KB Output is correct
13 Incorrect 0 ms 256 KB 3rd lines differ - on the 1st token, expected: '8', found: '6'
14 Halted 0 ms 0 KB -