"code":"class UndergroundSystem:\n\n def __init__(self):\n \n\n def checkIn(self, id: int, stationName: str, t: int) -> None:\n \n\n def checkOut(self, id: int, stationName: str, t: int) -> None:\n \n\n def getAverageTime(self, startStation: str, endStation: str) -> float:\n \n\n\n# Your UndergroundSystem object will be instantiated and called as such:\n# obj = UndergroundSystem()\n# obj.checkIn(id,stationName,t)\n# obj.checkOut(id,stationName,t)\n# param_3 = obj.getAverageTime(startStation,endStation)",
"__typename":"CodeSnippetNode"
},
{
"lang":"C",
"langSlug":"c",
"code":"\n\n\ntypedef struct {\n \n} UndergroundSystem;\n\n\nUndergroundSystem* undergroundSystemCreate() {\n \n}\n\nvoid undergroundSystemCheckIn(UndergroundSystem* obj, int id, char * stationName, int t) {\n \n}\n\nvoid undergroundSystemCheckOut(UndergroundSystem* obj, int id, char * stationName, int t) {\n \n}\n\ndouble undergroundSystemGetAverageTime(UndergroundSystem* obj, char * startStation, char * endStation) {\n \n}\n\nvoid undergroundSystemFree(UndergroundSystem* obj) {\n \n}\n\n/**\n * Your UndergroundSystem struct will be instantiated and called as such:\n * UndergroundSystem* obj = undergroundSystemCreate();\n * undergroundSystemCheckIn(obj, id, stationName, t);\n \n * undergroundSystemCheckOut(obj, id, stationName, t);\n \n * double param_3 = undergroundSystemGetAverageTime(obj, startStation, endStation);\n \n * undergroundSystemFree(obj);\n*/",
"__typename":"CodeSnippetNode"
},
{
"lang":"C#",
"langSlug":"csharp",
"code":"public class UndergroundSystem {\n\n public UndergroundSystem() {\n \n }\n \n public void CheckIn(int id, string stationName, int t) {\n \n }\n \n public void CheckOut(int id, string stationName, int t) {\n \n }\n \n public double GetAverageTime(string startStation, string endStation) {\n \n }\n}\n\n/**\n * Your UndergroundSystem object will be instantiated and called as such:\n * UndergroundSystem obj = new UndergroundSystem();\n * obj.CheckIn(id,stationName,t);\n * obj.CheckOut(id,stationName,t);\n * double param_3 = obj.GetAverageTime(startStation,endStation);\n */",
"__typename":"CodeSnippetNode"
},
{
"lang":"JavaScript",
"langSlug":"javascript",
"code":"\nvar UndergroundSystem = function() {\n \n};\n\n/** \n * @param {number} id \n * @param {string} stationName \n * @param {number} t\n * @return {void}\n */\nUndergroundSystem.prototype.checkIn = function(id, stationName, t) {\n \n};\n\n/** \n * @param {number} id \n * @param {string} stationName \n * @param {number} t\n * @return {void}\n */\nUndergroundSystem.prototype.checkOut = function(id, stationName, t) {\n \n};\n\n/** \n * @param {string} startStation \n * @param {string} endStation\n * @return {number}\n */\nUndergroundSystem.prototype.getAverageTime = function(startStation, endStation) {\n \n};\n\n/** \n * Your UndergroundSystem object will be instantiated and called as such:\n * var obj = new UndergroundSystem()\n * obj.checkIn(id,stationName,t)\n * obj.checkOut(id,stationName,t)\n * var param_3 = obj.getAverageTime(startStation,endStation)\n */",
"code":"class UndergroundSystem {\n constructor() {\n\n }\n\n checkIn(id: number, stationName: string, t: number): void {\n\n }\n\n checkOut(id: number, stationName: string, t: number): void {\n\n }\n\n getAverageTime(startStation: string, endStation: string): number {\n\n }\n}\n\n/**\n * Your UndergroundSystem object will be instantiated and called as such:\n * var obj = new UndergroundSystem()\n * obj.checkIn(id,stationName,t)\n * obj.checkOut(id,stationName,t)\n * var param_3 = obj.getAverageTime(startStation,endStation)\n */",
"__typename":"CodeSnippetNode"
},
{
"lang":"Racket",
"langSlug":"racket",
"code":"(define underground-system%\n (class object%\n (super-new)\n (init-field)\n \n ; check-in : exact-integer? string? exact-integer? -> void?\n (define/public (check-in id station-name t)\n\n )\n ; check-out : exact-integer? string? exact-integer? -> void?\n (define/public (check-out id station-name t)\n\n )\n ; get-average-time : string? string? -> flonum?\n (define/public (get-average-time start-station end-station)\n\n )))\n\n;; Your underground-system% object will be instantiated and called as such:\n;; (define obj (new underground-system%))\n;; (send obj check-in id station-name t)\n;; (send obj check-out id station-name t)\n;; (define param_3 (send obj get-average-time start-station end-station))",
"__typename":"CodeSnippetNode"
},
{
"lang":"Erlang",
"langSlug":"erlang",
"code":"-spec underground_system_init_() -> any().\nunderground_system_init_() ->\n .\n\n-spec underground_system_check_in(Id :: integer(), StationName :: unicode:unicode_binary(), T :: integer()) -> any().\nunderground_system_check_in(Id, StationName, T) ->\n .\n\n-spec underground_system_check_out(Id :: integer(), StationName :: unicode:unicode_binary(), T :: integer()) -> any().\nunderground_system_check_out(Id, StationName, T) ->\n .\n\n-spec underground_system_get_average_time(StartStation :: unicode:unicode_binary(), EndStation :: unicode:unicode_binary()) -> float().\nunderground_system_get_average_time(StartStation, EndStation) ->\n .\n\n\n%% Your functions will be called as such:\n%% underground_system_init_(),\n%% underground_system_check_in(Id, StationName, T),\n%% underground_system_check_out(Id, StationName, T),\n%% Param_3 = underground_system_get_average_time(StartStation, EndStation),\n\n%% underground_system_init_ will be called before every test case, in which you can do some necessary initializations.",
"__typename":"CodeSnippetNode"
},
{
"lang":"Elixir",
"langSlug":"elixir",
"code":"defmodule UndergroundSystem do\n @spec init_() :: any\n def init_() do\n\n end\n\n @spec check_in(id :: integer, station_name :: String.t, t :: integer) :: any\n def check_in(id, station_name, t) do\n\n end\n\n @spec check_out(id :: integer, station_name :: String.t, t :: integer) :: any\n def check_out(id, station_name, t) do\n\n end\n\n @spec get_average_time(start_station :: String.t, end_station :: String.t) :: float\n def get_average_time(start_station, end_station) do\n\n end\nend\n\n# Your functions will be called as such:\n# UndergroundSystem.init_()\n# UndergroundSystem.check_in(id, station_name, t)\n# UndergroundSystem.check_out(id, station_name, t)\n# param_3 = UndergroundSystem.get_average_time(start_station, end_station)\n\n# UndergroundSystem.init_ will be called before every test case, in which you can do some necessary initializations.",
"envInfo":"{\"cpp\": [\"C++\", \"<p>Compiled with <code> clang 11 </code> using the latest C++ 17 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level two optimization (<code>-O2</code>). <a href=\\\"https://github.com/google/sanitizers/wiki/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\"], \"java\": [\"Java\", \"<p><code> OpenJDK 17 </code>. Java 8 features such as lambda expressions and stream API can be used. </p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\\r\\n<p>Includes <code>Pair</code> class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.</p>\"], \"python\": [\"Python\", \"<p><code>Python 2.7.12</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/2/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/2/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/2/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\\r\\n\\r\\n<p>Note that Python 2.7 <a href=\\\"https://www.python.org/dev/peps/pep-0373/\\\" target=\\\"_blank\\\">will not be maintained past 2020</a>. For the latest Python, please choose Python3 instead.</p>\"], \"c\": [\"C\", \"<p>Compiled with <code>gcc 8.2</code> using the gnu99 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level one optimization (<code>-O1</code>). <a href=\\\"https://github.com/google/sanitizers/wiki/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\\r\\n\\r\\n<p>For hash table operations, you may use <a href=\\\"https://troydhanson.github.io/uthash/\\\" target=\\\"_blank\\\">uthash</a>. \\\"uthash.h\\\" is included by default. Below are some examples:</p>\\r\\n\\r\\n<p><b>1. Adding an item to a hash.</b>\\r\\n<pre>\\r\\nstruct hash_entry {\\r\\n int id; /* we'll use this field as the key */\\r\\n char name[10];\\r\\n UT_hash_handle hh; /* makes this structure hashable */\\r\\n};\\r\\n\\r\\nstruct hash_entry *users = NULL;\\r\\n\\r\\nvoid add_user(struct hash_entry *s) {\\r\\n HASH_ADD_INT(users, id, s);\\r\\n}\\r\\n</pre>\\r\\n</p>\\r\\n\\r\\n<p><b>2. Looking up an item in a hash:</b>\\r\\n<pre>\\r\\nstruct hash_entry *find_user(int user_id) {\\r\\n struct hash_entry *s;\\r\\n HASH_FIND_INT(users, &user_id, s);\\r\\n return s;\\r\\n}\\r\\n</pre>\\r\\n</p>\\r\\n\\r\\n<p><b>3. Deleting an item in a hash:</b>\\r\\n<pre>\\r\\nvoid delete_user(struct hash_entry *user) {\\r\\n HASH_DEL(users, user); \\r\\n}\\r\\n</pre>\\r\\n</p>\"], \"csharp\": [\"C#\", \"<p><a href=\\\"https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9\\\" target=\\\"_blank\\\">C# 10 with .NET 6 runtime</a></p>\\r\\n\\r\\n<p>Your code is compiled with debug flag enabled (<code>/debug</code>).</p>\"], \"javascript\": [\"JavaScript\", \"<p><code>Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES6 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\\r\\n\\r\\n<p>For Priority Queue / Queue data structures, you may use <a href=\\\"https://github.com/datastructures-js/priority-queue\\\" target=\\\"_blank\\\">datastructures-js/priority-queue</a> and <a href=\\\"https: