Skip to content

Commit e6ac5f0

Browse files
committed
schema: fledling submissions.cue
1 parent cd8988d commit e6ac5f0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

support/schemas/submissions.cue

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package problemformat
2+
3+
import "list"
4+
5+
#person: =~"^[^<]+(<[^>]+>)?$" // "Alice" or "Bob <bob@com>"
6+
7+
#verdict: "AC" | "WA" | "RTE" | "TLE"
8+
9+
#testnode_pattern: =~"[a-zA-Z0-9_/\\*]+" // TODO
10+
#Submissions: {
11+
language?: string
12+
entrypoint?: string
13+
author?: #person | [...#person]
14+
#expectation
15+
[=~"^(sample|secret|\\*)" & #testnode_pattern]: #expectation
16+
}
17+
18+
#expectation: {
19+
permitted?: [#verdict, ...#verdict] // only these verdicts may appear
20+
required?: [#verdict, ...#verdict] // at least one of these verdicts must appear
21+
score?: int | [int, int] & list.IsSorted(list.Ascending)
22+
use_for_timelmit?: false | "lower" | "upper"
23+
}
24+
25+
// Play with me at https://cuelang.org/play/?id=3oy3DL9Hx5X#w=function&i=cue&f=eval&o=cue

0 commit comments

Comments
 (0)