{"id":16515546,"url":"https://github.com/linnykoleh/googlepizza","last_synced_at":"2026-05-24T16:32:13.825Z","repository":{"id":107579291,"uuid":"82676632","full_name":"linnykoleh/GooglePizza","owner":"linnykoleh","description":"Google hashcode task","archived":false,"fork":false,"pushed_at":"2019-02-12T16:20:20.000Z","size":1153,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T17:11:19.432Z","etag":null,"topics":["google","hashcode-2017","hashcode-2019","pizza","slice"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linnykoleh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-21T12:21:54.000Z","updated_at":"2021-01-13T08:00:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"da4c6977-2940-4e9c-af72-9e106fbca5d7","html_url":"https://github.com/linnykoleh/GooglePizza","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linnykoleh/GooglePizza","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnykoleh%2FGooglePizza","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnykoleh%2FGooglePizza/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnykoleh%2FGooglePizza/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnykoleh%2FGooglePizza/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linnykoleh","download_url":"https://codeload.github.com/linnykoleh/GooglePizza/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnykoleh%2FGooglePizza/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33442523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T13:13:05.286Z","status":"ssl_error","status_checked_at":"2026-05-24T13:13:03.728Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google","hashcode-2017","hashcode-2019","pizza","slice"],"created_at":"2024-10-11T16:17:31.114Z","updated_at":"2026-05-24T16:32:13.820Z","avatar_url":"https://github.com/linnykoleh.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TeamPizza\n\n### Practice Problem for Google Hash Code 2017\n\n### Introduction\n\nDid you know that at any given time, someone is cutting pizza somewhere around the world? The decision\nabout how to cut the pizza sometimes is easy, but sometimes it’s really hard: you want just the right amount\nof tomatoes and mushrooms on each slice. If only there was a way to solve this problem using technology...\n\n### Problem description\n\n**Pizza**\n\nThe pizza is represented as a rectangular, 2-dimensional grid of R rows and C columns. The cells within the\ngrid are referenced using a pair of 0-based coordinates [r, c] , denoting respectively the row and the\ncolumn of the cell.\n\nEach cell of the pizza contains either:\n - mushroom, represented in the input file as M \n - tomato, represented in the input file as T\n \n**Slice**\n\nA slice of pizza is a rectangular section of the pizza delimited by two rows and two columns, without holes.\nThe slices we want to cut out must contain at least L cells of each ingredient (that is, at least L cells of\nmushroom and at least L cells of tomato) and at most H cells of any kind in total - surprising as it is, there is\nsuch a thing as too much pizza in one slice.\nThe slices being cut out cannot overlap. The slices being cut do not need to cover the entire pizza.\n\n**Goal**\n\nThe goal is to cut correct slices out of the pizza maximizing the total number of cells in all slices.\nInput data set\nThe input data is provided as a data set file - a plain text file containing exclusively ASCII characters with\nlines terminated with a single ‘\\n’ character at the end of each line (UNIX- style line endings).\n\n**File format**\n\nThe file consists of:\n - one line containing the following natural numbers separated by single spaces:\n\t - R (1 ≤ R ≤ 1000) is the number of rows\n\t - C (1 ≤ C ≤ 1000) is the number of columns\n\t - L (1 ≤ L ≤ 1000) is the minimum number of each ingredient cells in a slice\n\t - H (1 ≤ H ≤ 1000) is the maximum total number of cells of a slice\n \n - R lines describing the rows of the pizza (one after another). Each of these lines contains C\ncharacters describing the ingredients in the cells of the row (one cell after another). Each character\nis either ‘M’ (for mushroom) or ‘T’ (for tomato).\n\n**Example**\n\n![alt](images/Screenshot.png)\n\n**Submissions**\n\n**File format**\n\nThe file must consist of:\n- one line containing a single natural number S (0 ≤ S ≤ R × C) , representing the total number of slices to be cut,\n- U lines describing the slices. Each of these lines must contain the following natural numbers separated by single spaces:\n-  r 1 , c 1 , r 2 , c 2 describe a slice of pizza delimited by the rows r (0 ≤ r1,r2 \u003c R, 0 ≤ c1, c2 \u003c C) 1 and r 2 and the columns c 1 and c 2 , including the cells of the delimiting rows and columns. The rows ( r 1 and r 2 ) can be given in any order. The columns ( c 1 and c 2 ) can be given in any order too.\n\n\n![alt](images/Screenshot_1.png)\n\n### Validation\n\nFor the solution to be accepted:\n- the format of the file must match the description above,\n- each cell of the pizza must be included in at most one slice,\n- each slice must contain at least L cells of mushroom,\n- each slice must contain at least L cells of tomato,\n- total area of each slice must be at most H\n\n### Scoring\n\nThe submission gets a score equal to the total number of cells in all slices.\nNote that there are multiple data sets representing separate instances of the problem. The final\nscore for your team is the sum of your best scores on the individual data sets.\n\n### Scoring example\n\nThe example submission file given above cuts the slices of 6, 3 and 6 cells, earning 6 + 3 + 6 = 15 points.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinnykoleh%2Fgooglepizza","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinnykoleh%2Fgooglepizza","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinnykoleh%2Fgooglepizza/lists"}