Usuń 'run.py'

This commit is contained in:
Ihnatsi Byshniou 2023-11-01 22:40:40 +01:00
parent 6236853103
commit d027c0f9a2
1 changed files with 0 additions and 29 deletions

29
run.py
View File

@ -1,29 +0,0 @@
import sys
def write_answer(answer):
with open('test1.out', 'a') as file:
file.write(answer+'\n')
def find_next_position(position, character):
with open('fsa_description.arg', 'r') as readed_used_table:
for row_used_table in readed_used_table:
line = row_used_table.strip().split('\t')
if position == line[0] and character == line[2]:
return True,line[1]
# used_table = sys.argv[1]
# input_file = sys.argv[2]
with open('test1.out', 'w') as readed_output_file:
with open('test1.in', 'r') as readed_input_file:
for row_input_file in readed_input_file:
result = False
next_position = None
position = '0'
for character in row_input_file:
if character =='\n':
if position=='3':
write_answer('YES')
break
else:
write_answer('NO')
break
result, next_position = find_next_position(position,character)
if result == True:
position = next_position