We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2923b1e commit d01efc0Copy full SHA for d01efc0
problemtools/verifyproblem.py
@@ -285,8 +285,9 @@ def check(self, context: Context) -> bool:
285
if not self._problem.is_interactive():
286
val_res = self._problem.output_validators.validate(self, self.ansfile)
287
if val_res.verdict != 'AC':
288
- ans_path = Path(self.ansfile)
289
- testcase_relative_data = Path(*ans_path.parts[ans_path.parts.index("data"):])
+ parts = Path(self.ansfile).parts
+ idx = len(parts) - 1 - parts[::-1].index('data') # Last occurrence of "data"
290
+ testcase_relative_data = Path(*parts[idx:])
291
292
if self.is_in_sample_group():
293
self.error(f'judge answer file got {val_res} on testcase {testcase_relative_data}')
0 commit comments