-
Notifications
You must be signed in to change notification settings - Fork 4
/
submission.go
25 lines (23 loc) · 861 Bytes
/
submission.go
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
package goforces
//Submission represents a Codeforces Submission
type Submission struct {
ID int `json:"id"`
ContestID int `json:"contestId"`
CreationTimeSeconds int64 `json:"creationTimeSeconds"`
RelativeTimeSeconds int64 `json:"relativeTimeSeconds"`
Problem Problem `json:"problem"`
Author Party `json:"author"`
ProgrammingLanguage string `json:"programmingLanguage"`
Verdict string `json:"verdict"`
Testset string `json:"testset"`
PassedTestCount int `json:"passedTestCount"`
TimeConsumedMillis int `json:"timeConsumedMillis"`
MemoryConsumedBytes int `json:"memoryConsumedBytes"`
}
//AC returns boolean whether submission passed all test cases
func (s *Submission) AC() bool {
if s.Verdict == "OK" {
return true
}
return false
}