-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd8988d
commit d94d2f3
Showing
1 changed file
with
25 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package problemformat | ||
|
||
import "list" | ||
|
||
#person: =~"^[^<]+(<[^>]+>)?$" // "Alice" or "Bob <bob@com>" | ||
|
||
#verdict: "AC" | "WA" | "RTE" | "TLE" | ||
|
||
#testnode_pattern: =~"[a-zA-Z0-9_/\\*]+" // TODO | ||
#Submissions: { | ||
language?: string | ||
entrypoint?: string | ||
author?: #person | [...#person] | ||
#expectation | ||
[=~"^(sample|secret|\\*)" & #testnode_pattern]: #expectation | ||
} | ||
|
||
#expectation: { | ||
permitted?: [#verdict, ...#verdict] // only these verdicts may appear | ||
required?: [#verdict, ...#verdict] // at least one of these verdicts must appear | ||
score?: int | [int, int] & list.IsSorted(list.Ascending) | ||
use_for_timelmit?: false | "lower" | "upper" | ||
} | ||
|
||
// Play with me at https://cuelang.org/play/?id=3oy3DL9Hx5X#w=function&i=cue&f=eval&o=cue |