





import sys

sys.set_int_max_str_digits(0)  # type: ignore






def 			SCREAMING_SNAKE_CASE__							(    UpperCamelCase__:							int      ):
		SCREAMING_SNAKE_CASE__								= [0] * 11
		SCREAMING_SNAKE_CASE__								= [0] * 11

		# mark last 9 numbers
		for _ in range(9      ):
				SCREAMING_SNAKE_CASE__								= 1
				SCREAMING_SNAKE_CASE__								= number // 10
		# flag
		SCREAMING_SNAKE_CASE__								= True

		# check last 9 numbers for pandigitality

		for x in range(9      ):
				if not check_last[x + 1]:
						SCREAMING_SNAKE_CASE__								= False
		if not f:
				return f

		# mark first 9 numbers
		SCREAMING_SNAKE_CASE__								= int(str(UpperCamelCase__      )[:9]      )

		for _ in range(9      ):
				SCREAMING_SNAKE_CASE__								= 1
				SCREAMING_SNAKE_CASE__								= number // 10

		# check first 9 numbers for pandigitality

		for x in range(9      ):
				if not check_front[x + 1]:
						SCREAMING_SNAKE_CASE__								= False
		return f






def 			SCREAMING_SNAKE_CASE__							(    UpperCamelCase__:							int      ):
		SCREAMING_SNAKE_CASE__								= [0] * 11

		# mark last 9 numbers
		for _ in range(9      ):
				SCREAMING_SNAKE_CASE__								= 1
				SCREAMING_SNAKE_CASE__								= number // 10
		# flag
		SCREAMING_SNAKE_CASE__								= True

		# check last 9 numbers for pandigitality

		for x in range(9      ):
				if not check_last[x + 1]:
						SCREAMING_SNAKE_CASE__								= False
		return f






def 			SCREAMING_SNAKE_CASE__							(    ):
		SCREAMING_SNAKE_CASE__								= 1
		SCREAMING_SNAKE_CASE__								= 1
		SCREAMING_SNAKE_CASE__								= 2
		# temporary Fibonacci numbers

		SCREAMING_SNAKE_CASE__								= 1
		SCREAMING_SNAKE_CASE__								= 1
		SCREAMING_SNAKE_CASE__								= 2
		# temporary Fibonacci numbers mod 1e9

		# mod m=1e9, done for fast optimisation
		SCREAMING_SNAKE_CASE__								= [0] * 1_000_000
		SCREAMING_SNAKE_CASE__								= 1_000_000_000

		for x in range(1_000_000      ):
				SCREAMING_SNAKE_CASE__								= (aa + ba) % m
				SCREAMING_SNAKE_CASE__								= ba % m
				SCREAMING_SNAKE_CASE__								= ca % m
				if checka(UpperCamelCase__      ):
						SCREAMING_SNAKE_CASE__								= 1

		for x in range(1_000_000      ):
				SCREAMING_SNAKE_CASE__								= a + b
				SCREAMING_SNAKE_CASE__								= b
				SCREAMING_SNAKE_CASE__								= c
				# perform check only if in tocheck
				if tocheck[x + 3] and check(UpperCamelCase__      ):
						return x + 3  # first 2 already done
		return -1


if __name__ == "__main__":
	print(F'''{solution() = }''')






import json
import os
import tempfile

import datasets
from utils import generate_example_dataset, get_duration


_lowerCamelCase							=     500000

_lowerCamelCase			,    _lowerCamelCase							=     os.path.split(__file__)
_lowerCamelCase							=     os.path.join(RESULTS_BASEPATH, 'results', RESULTS_FILENAME.replace('.py', '.json'))






@get_duration
def 			SCREAMING_SNAKE_CASE__							(    UpperCamelCase__:							datasets.Dataset      ):
		SCREAMING_SNAKE_CASE__								= dataset.select(range(0   ,				len(UpperCamelCase__      )   ,				2      )      )






@get_duration
def 			SCREAMING_SNAKE_CASE__							(    UpperCamelCase__:							datasets.Dataset      ):
		SCREAMING_SNAKE_CASE__								= dataset.sort("""numbers"""      )






@get_duration
def 			SCREAMING_SNAKE_CASE__							(    UpperCamelCase__:							datasets.Dataset      ):
		SCREAMING_SNAKE_CASE__								= dataset.shuffle()






@get_duration
def 			SCREAMING_SNAKE_CASE__							(    UpperCamelCase__:							datasets.Dataset      ):
		SCREAMING_SNAKE_CASE__								= dataset.train_test_split(0.1      )






@get_duration
def 			SCREAMING_SNAKE_CASE__							(    UpperCamelCase__:							datasets.Dataset   ,				UpperCamelCase__:							Tuple=10      ):
		for shard_id in range(UpperCamelCase__      ):
				SCREAMING_SNAKE_CASE__								= dataset.shard(UpperCamelCase__   ,				UpperCamelCase__      )






def 			SCREAMING_SNAKE_CASE__							(    ):
		SCREAMING_SNAKE_CASE__								= {"""num examples""": SPEED_TEST_N_EXAMPLES}
		SCREAMING_SNAKE_CASE__								= (select, sort, shuffle, train_test_split, shard)
		with tempfile.TemporaryDirectory() as tmp_dir:
				print("""generating dataset"""      )
				SCREAMING_SNAKE_CASE__								= datasets.Features({"""text""": datasets.Value("""string"""      ), """numbers""": datasets.Value("""float32"""      )}      )
				SCREAMING_SNAKE_CASE__								= generate_example_dataset(
				    os.path.join(UpperCamelCase__   ,				"""dataset.arrow"""      )   ,				UpperCamelCase__   ,				num_examples=UpperCamelCase__      )
				print("""Functions"""      )
				for func in functions:
						print(func.__name__      )
						SCREAMING_SNAKE_CASE__								= func(UpperCamelCase__      )

		with open(UpperCamelCase__   ,				"""wb"""      ) as f:
				f.write(json.dumps(UpperCamelCase__      ).encode("""utf-8"""      )      )


if __name__ == "__main__":  # useful to run the profiler
	benchmark_indices_mapping()