#!/usr/bin/env python import sys sys.setrecursionlimit(1000000000) # # Solution Template for TSP # # Australian Informatics Olympiad 2022 # # This file is provided to assist with reading and writing of the input # files for the problem. You may modify this file however you wish, or # you may choose not to use this file at all. # # N is the number of days. N = None # L contains the minimum number of tomatoes you must sell each day. L = [] # R contains the maximum number of tomatoes you must sell each day. R = [] # Open the input and output files. input_file = open("tspin.txt", "r") output_file = open("tspout.txt", "w") # Read the value of N. N = int(input_file.readline().strip()) # Read the values of L and R. input_line = input_file.readline().strip() L = list(map(int, input_line.split())) input_line = input_file.readline().strip() R = list(map(int, input_line.split())) # TODO: This is where you should compute your solution. You should output YES # or NO depending on whether it is possible to meet the requirements. An # example of how to output YES is shown below. output_file.write("YES\n") # Finally, close the input/output files. input_file.close() output_file.close()