1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
| #define Administrator 0x7 #define UserManager 0x1 #define ContestManager 0x2 #define SubmissionManager 0x4 struct User { char Id[32]; char Email[32]; char ContestantId[32]; char ContestantName[32]; char Password[32]; int ClassId; uint32_t Roles; };
struct Class { int Id; char Name[16]; };
struct Bulletin { int Id; int Weight; char *Content; struct tm PublishAt; struct tm ExpireAt; };
struct Problem { int Id; int ContestId; enum { Ordinary, TestKitLab } Type; char Title[128]; char *Description; char *InputFormat; char *OutputFormat; char *FootNote; double TimeLimit; int MemoryLimit; bool HasSpecialJudge; bool SkipSample; int SampleCasesCnt; char **SampleCasesInput; char **SampleCasesOutput; int TestCasesCnt; char **TestCasesInputPath; char **TestCasesOutputPath; struct tm SpjEdited; struct tm TestEdited; bool IsGroupLimited; char *WorkerGroup; };
struct Contest { int Id; char title[128]; char *description; enum { Public, Private, Protected } Visibility; enum { Practice, CodeForces, ACM, OI } ContestMode; struct tm BeginTime; struct tm SoftDDL; struct tm HardDDL; bool HasDecay; bool IsDecayLinear; int Decay[3]; struct tm DecayTime[3]; };
struct Submission { int Id; char UserId[32]; enum { C, Cpp, Rust } Language; int ProblemId; struct tm SubmittedAt; struct tm JudgedAt; enum { FAILED, REJECTED, TESTOK, PENDING, JUDGING, ACCEPTED, WRONGANSWER, TIMELIMITEXCEEDED, COMPILEERROR, MEMORYLIMITEXCEEDED, PARTIALLYACCEPTED, RUNTIMEERROR, NGLANGUAGE, DRPRECATED } Verdict; char *SourceCode; int Time; int Memory; int Score; bool HasInput; char *UserInput; char *Message; char *JudgedBy; char *FailedOn; };
|