-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HACK: refactor OSN 2024 hacks on grader-side
- Loading branch information
Showing
3 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
judgels-backends/judgels-grader-engines/src/main/java/judgels/gabriel/api/Osn2024Hacks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package judgels.gabriel.api; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public class Osn2024Hacks { | ||
private Osn2024Hacks() {} | ||
|
||
private static final List<String> CERTAIN_PROBLEM_JIDS = Arrays.asList( | ||
"JIDPROG0NHjqvK7B7oiYf6mOOov", | ||
"JIDPROGiZN73iuSVYJE5btHUzni", | ||
"JIDPROGbDLh6vwDRHTXFijN3HYC", | ||
"JIDPROGSohGUsEykcREuewkE2cn" | ||
); | ||
|
||
public static String checkForHack(String problemJid, String gradingConfig) { | ||
if (CERTAIN_PROBLEM_JIDS.contains(problemJid)) { | ||
String hacked = gradingConfig; | ||
hacked = hacked.substring(0, hacked.length() - 1); | ||
hacked = hacked + ",\"scoringConfig\":{\"roundingMode\":\"FLOOR\"}}"; | ||
return hacked; | ||
} | ||
return gradingConfig; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters