-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJSON_Scoreboard_2014.mw
83 lines (72 loc) · 3.33 KB
/
JSON_Scoreboard_2014.mw
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
===Scoreboard JSON File===
====Background====
Since 2012 a JSON version of the scoreboard has been provided using an ad-hoc format. This scoreboard is not yet officially supported. It will most likely be provided in 2014. The format may change. This page describes the current version.
====Format====
Each JSON output is created is an JSON array with zero or
more JSON objects. Each object in the array corresponds to a scoreboard row. The output will be in a single long JSON
string.
Sample JSON if no teams defined
[]
Each row object includes information about the team, the problems they have submitted on and scoring information. The rows are ordered by the teams' positions according to the ICPC WF scoring rules.
This example is formatted in order to better show the example,
the actual JSON does not need to include line breaks. The example is truncated and shows just the top two teams.
[ {"id":"61","rank":1,"solved":9,"score":1170,"name":"St. Petersburg State University of IT, Mechanics and Optics","group":"Europe",
"A":{"a":0,"p":3,"s":"pend"},
"B":{"a":1,"t":18,"s":"solved"},
"C":{"a":1,"t":79,"s":"solved"},
"D":{"a":2,"t":42,"s":"solved"},
"E":{"a":2,"t":165,"s":"solved"},
"F":{"a":2,"t":142,"s":"first"},
"G":{"a":1,"t":208,"s":"solved"},
"I":{"a":2,"t":125,"s":"solved"},
"K":{"a":1,"t":49,"s":"solved"},
"L":{"a":1,"t":262,"s":"solved"}},
{"id":"103","rank":2,"solved":8,"score":1176,"name":"University of Warsaw","group":"Europe",
"A":{"a":5,"p":1,"s":"pend"},
"B":{"a":1,"t":32,"s":"solved"},
"C":{"a":2,"t":60,"s":"solved"},
"D":{"a":1,"t":19,"s":"solved"},
"E":{"a":1,"t":187,"s":"solved"},
"F":{"a":1,"s":"tried"},
"G":{"a":3,"t":234,"s":"solved"},
"I":{"a":2,"t":147,"s":"solved"},
"K":{"a":5,"t":128,"s":"solved"},
"L":{"a":3,"t":169,"s":"solved"}},
....
]
====General Format for row objects====
The format of a scoreboard row object is
{"id":"<team_id>","rank":<Rank>,"solved":<problems_solved>,"score":<team_score>,"name":"<University_name>","group":"<Group_name>"
(,"<Problem_letter>":{"a":<Attempts>(,"p":<Pending>)?(,"t":<Elapsed_time>)?,"s":"<Results_phase>"})*}
where (...)* implies zero or more occurances and (...)? implies zero or one occurance.
=====Fields and examples for sequence, team and problem JSON members=====
{| class="wikitable"
! Name
! Key
! Description
! Example
! Type
|-
|team_id||id|| Team number || 3 ||integer
|-
|Rank||rank|| rank in contest || 12 ||integer
|-
|problems_solved ||solved|| number problems solved || 5 ||integer
|-
|team_score||score|| team score / penalty || 324 ||integer
|-
|University_name ||name|| University/team name || Oxford University || String
|-
|Group_name||group|| Group/Region name || Europe || String
|-
|Problem_letter ||(N/A)|| letter for problem || D || upper case char [A-Z]
|-
|Attempts ||a|| number of judged attempts for problem (thus not those pending judgement)|| 3 || Integer
|-
|Elapsed_time ||t|| time when solved || 143 || Integer
|-
|Pending ||p|| pending runs count || 2 || Integer
|-
|Results_phase ||s|| results/info about run || solved || String: "tried", "solved", "first", "pend"
|}
The key "p" is only present if Result_phase is "pend" and the key "t" is only present if the Result_phase is "solved".