2022-03-27 18:27:43 +08:00
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"question": {
|
|
|
|
"questionId": "2296",
|
|
|
|
"questionFrontendId": "2153",
|
|
|
|
"boundTopicId": null,
|
|
|
|
"title": "The Number of Passengers in Each Bus II",
|
|
|
|
"titleSlug": "the-number-of-passengers-in-each-bus-ii",
|
|
|
|
"content": null,
|
|
|
|
"translatedTitle": null,
|
|
|
|
"translatedContent": null,
|
|
|
|
"isPaidOnly": true,
|
|
|
|
"difficulty": "Hard",
|
2023-12-09 18:42:21 +08:00
|
|
|
"likes": 71,
|
|
|
|
"dislikes": 28,
|
2022-03-27 18:27:43 +08:00
|
|
|
"isLiked": null,
|
|
|
|
"similarQuestions": "[]",
|
|
|
|
"exampleTestcases": "{\"headers\":{\"Buses\":[\"bus_id\",\"arrival_time\",\"capacity\"],\"Passengers\":[\"passenger_id\",\"arrival_time\"]},\"rows\":{\"Buses\":[[1,2,1],[2,4,10],[3,7,2]],\"Passengers\":[[11,1],[12,1],[13,5],[14,6],[15,7]]}}",
|
|
|
|
"categoryTitle": "Database",
|
|
|
|
"contributors": [],
|
|
|
|
"topicTags": [
|
|
|
|
{
|
|
|
|
"name": "Database",
|
|
|
|
"slug": "database",
|
|
|
|
"translatedName": null,
|
|
|
|
"__typename": "TopicTagNode"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"companyTagStats": null,
|
|
|
|
"codeSnippets": null,
|
2023-12-09 18:42:21 +08:00
|
|
|
"stats": "{\"totalAccepted\": \"2.5K\", \"totalSubmission\": \"6K\", \"totalAcceptedRaw\": 2458, \"totalSubmissionRaw\": 6034, \"acRate\": \"40.7%\"}",
|
2022-03-27 18:27:43 +08:00
|
|
|
"hints": [],
|
|
|
|
"solution": null,
|
|
|
|
"status": null,
|
|
|
|
"sampleTestCase": "{\"headers\":{\"Buses\":[\"bus_id\",\"arrival_time\",\"capacity\"],\"Passengers\":[\"passenger_id\",\"arrival_time\"]},\"rows\":{\"Buses\":[[1,2,1],[2,4,10],[3,7,2]],\"Passengers\":[[11,1],[12,1],[13,5],[14,6],[15,7]]}}",
|
2023-12-09 18:42:21 +08:00
|
|
|
"metaData": "{\"mysql\": [\"Create table If Not Exists Buses (bus_id int, arrival_time int, capacity int)\", \"Create table If Not Exists Passengers (passenger_id int, arrival_time int)\"], \"mssql\": [\"Create table Buses (bus_id int, arrival_time int, capacity int)\", \"Create table Passengers (passenger_id int, arrival_time int)\"], \"oraclesql\": [\"Create table Buses (bus_id int, arrival_time int, capacity int)\", \"Create table Passengers (passenger_id int, arrival_time int)\"], \"database\": true, \"name\": \"number_of_passengers\", \"pythondata\": [\"Buses = pd.DataFrame([], columns=['bus_id', 'arrival_time', 'capacity']).astype({'bus_id':'Int64', 'arrival_time':'Int64', 'capacity':'Int64'})\", \"Passengers = pd.DataFrame([], columns=['passenger_id', 'arrival_time']).astype({'passenger_id':'Int64', 'arrival_time':'Int64'})\"], \"postgresql\": [\"Create table If Not Exists Buses (bus_id int, arrival_time int, capacity int)\", \"Create table If Not Exists Passengers (passenger_id int, arrival_time int)\"], \"database_schema\": {\"Buses\": {\"bus_id\": \"INT\", \"arrival_time\": \"INT\", \"capacity\": \"INT\"}, \"Passengers\": {\"passenger_id\": \"INT\", \"arrival_time\": \"INT\"}}}",
|
2022-03-27 18:27:43 +08:00
|
|
|
"judgerAvailable": true,
|
|
|
|
"judgeType": "large",
|
|
|
|
"mysqlSchemas": [
|
|
|
|
"Create table If Not Exists Buses (bus_id int, arrival_time int, capacity int)",
|
|
|
|
"Create table If Not Exists Passengers (passenger_id int, arrival_time int)",
|
|
|
|
"Truncate table Buses",
|
|
|
|
"insert into Buses (bus_id, arrival_time, capacity) values ('1', '2', '1')",
|
|
|
|
"insert into Buses (bus_id, arrival_time, capacity) values ('2', '4', '10')",
|
|
|
|
"insert into Buses (bus_id, arrival_time, capacity) values ('3', '7', '2')",
|
|
|
|
"Truncate table Passengers",
|
|
|
|
"insert into Passengers (passenger_id, arrival_time) values ('11', '1')",
|
|
|
|
"insert into Passengers (passenger_id, arrival_time) values ('12', '1')",
|
|
|
|
"insert into Passengers (passenger_id, arrival_time) values ('13', '5')",
|
|
|
|
"insert into Passengers (passenger_id, arrival_time) values ('14', '6')",
|
|
|
|
"insert into Passengers (passenger_id, arrival_time) values ('15', '7')"
|
|
|
|
],
|
|
|
|
"enableRunCode": true,
|
|
|
|
"enableTestMode": false,
|
|
|
|
"enableDebugger": false,
|
2023-12-09 18:42:21 +08:00
|
|
|
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"], \"pythondata\": [\"Pandas\", \"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0</p>\"], \"postgresql\": [\"PostgreSQL\", \"<p>PostgreSQL 16</p>\"]}",
|
2022-03-27 18:27:43 +08:00
|
|
|
"libraryUrl": null,
|
|
|
|
"adminUrl": null,
|
|
|
|
"challengeQuestion": null,
|
|
|
|
"__typename": "QuestionNode"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|