Skip to content

Commit 5c72556

Browse files
Toshihiro ShimizuToshihiro Shimizu
authored andcommitted
修正
1 parent 5cb11dd commit 5c72556

File tree

10 files changed

+8
-10
lines changed

10 files changed

+8
-10
lines changed

atcodertools/codegen/code_generators/universal_generator/cpp.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ insert_space_around_operators = false
33

44
# global変数宣言時の接頭辞
55
global_prefix = ""
6+
solve_function = "solve({actual_arguments});"
67

78
# ループ
89
[loop]

atcodertools/codegen/code_generators/universal_generator/cs.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ insert_space_around_operators = false
44

55
# global変数宣言時の接頭辞
66
global_prefix = ""
7+
solve_function = "new Program().Solve({actual_arguments});"
78

89
# ループ
910
[loop]

atcodertools/codegen/code_generators/universal_generator/d.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ insert_space_around_operators = false
55
global_prefix = ""
66
input_part_prefix = "auto input = stdin.byLine.map!split.joiner;"
77
newline_after_input = true
8+
solve_function = "solve({actual_arguments});"
89

910
# ループ
1011
[loop]

atcodertools/codegen/code_generators/universal_generator/go.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ insert_space_around_operators = false
33

44
# global変数宣言時の接頭辞
55
global_prefix = ""
6+
solve_function = "solve({actual_arguments})"
67

78
# ループ
89
[loop]

atcodertools/codegen/code_generators/universal_generator/java.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ insert_space_around_operators = false
44
# global変数宣言時の接頭辞
55
global_prefix = "static "
66
input_part_prefix = "final Scanner sc = new Scanner(System.in);"
7+
solve_function = "solve({actual_arguments});"
78

89
# ループ
910
[loop]

atcodertools/codegen/code_generators/universal_generator/julia.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ insert_space_around_operators = false
33

44
# global変数宣言時の接頭辞
55
global_prefix = ""
6+
solve_function = "solve({actual_arguments})"
67

78
# インデックス
89
[index]

atcodertools/codegen/code_generators/universal_generator/nim.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ insert_space_around_operators = false
33

44
# global変数宣言時の接頭辞
55
global_prefix = ""
6+
solve_function = "solve({actual_arguments})"
67

78
# ループ
89
[loop]

atcodertools/fmtprediction/predict_format.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ def suspect_single_string(input_format: list[str], samples):
4141

4242
def predict_format(content: ProblemContent) -> list[FormatPredictionResult]:
4343
input_format = content.get_input_format()
44-
print("input_format.loop_length_var: ", input_format.loop_length_var)
4544
samples = content.get_samples()
4645
# TODO: primeの置換、ここでいいのか?
4746
input_format_str_list = list(map(lambda x: x.replace('\'', 'prime'), input_format.input_format))
48-
print("input_format_str_list: ", input_format_str_list)
4947
if len(samples) == 0:
5048
raise NoPredictionResultError
5149

@@ -126,7 +124,7 @@ def predict_format(content: ProblemContent) -> list[FormatPredictionResult]:
126124
continue
127125

128126
return output_cands[0]
129-
127+
raise NoPredictionResultError
130128

131129
# if len(output_cands) == 1:
132130
# return output_cands[0]

atcodertools/fmtprediction/predict_types.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,9 @@ def merge_type_dicts(to_dict: Dict[str, Type], src_dict: Dict[str, Type]):
143143

144144
def predict_types(simple_format: list[Format[SimpleVariable]], samples: List[Sample], loop_length_var: str) -> Dict[str, Type]:
145145
res_type_dict = {}
146-
print(simple_format)
147146
if len(simple_format) == 1:
148-
print("SINGLE")
149147
for sample in samples:
150148
token_manager = TokenManager(sample.get_input().split())
151-
print("simple_format[0]: ")
152-
print(simple_format[0])
153149
predictor = TypePredictor(simple_format[0])
154150
try:
155151
while not token_manager.is_terminal():
@@ -163,7 +159,6 @@ def predict_types(simple_format: list[Format[SimpleVariable]], samples: List[Sam
163159
InvalidLoopIndexError, EvaluateError):
164160
raise TypePredictionFailedError
165161
else:
166-
print("MULTI!!")
167162
for sample in samples:
168163
token_manager = TokenManager(sample.get_input().split())
169164
predictor = TypePredictor(simple_format[0])

atcodertools/fmtprediction/tokenize_format.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,7 @@ def search_formats_with_minimum_vars(input_format: list[str]) -> List[TokenizedF
163163
Fast enough for realistic instances.
164164
This method returns possible formats with the smallest number of variables.
165165
"""
166-
print("search format with minimum vars: ",input_format)
167166
tokens = list(map(_sanitized_tokens, input_format))
168-
print("tokens: ", tokens)
169167
a = []
170168
for token in tokens:
171169
searcher = FormatSearcher(token)

0 commit comments

Comments
 (0)