{"id":19175595,"url":"https://github.com/poudel/protohacke-rs","last_synced_at":"2026-06-17T03:31:47.306Z","repository":{"id":158844005,"uuid":"631600213","full_name":"poudel/protohacke-rs","owner":"poudel","description":"[WIP] Solutions for https://protohackers.com","archived":false,"fork":false,"pushed_at":"2023-06-05T22:56:59.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-21T22:02:21.242Z","etag":null,"topics":["protohackers","protohackers-solutions","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/poudel.png","metadata":{"files":{"readme":"readme.org","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":"2023-04-23T14:36:23.000Z","updated_at":"2023-06-22T15:18:56.000Z","dependencies_parsed_at":"2023-06-11T22:49:15.389Z","dependency_job_id":null,"html_url":"https://github.com/poudel/protohacke-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/poudel/protohacke-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poudel%2Fprotohacke-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poudel%2Fprotohacke-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poudel%2Fprotohacke-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poudel%2Fprotohacke-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poudel","download_url":"https://codeload.github.com/poudel/protohacke-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poudel%2Fprotohacke-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34433085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["protohackers","protohackers-solutions","rust"],"created_at":"2024-11-09T10:24:04.849Z","updated_at":"2026-06-17T03:31:47.286Z","avatar_url":"https://github.com/poudel.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+title: protohackers.com solutions\n#+startup: overview\n\n[WIP] Solutions for https://protohackers.com exercises\n\n\n* [[https://protohackers.com/problem/0][00 Smoke Test]]\n\nTCP server that echoes back\n\n#+begin_src shell\ncargo run 0\n#+end_src\n\nTo test\n\n#+begin_src shell\nnc 127.0.0.1 8838\n#+end_src\n\n\n* [[https://protohackers.com/problem/1][01 Prime time]]\n\nIndustrial strength primality tester\n\n#+begin_src shell\ncargo run 1\n#+end_src\n\nTo test\n\n#+begin_src shell\nnc 127.0.0.1 8838\n#+end_src\n\n\n* [[https://protohackers.com/problem/2][02 Means to an End]]\n\n#+begin_src shell\ncargo run 2\n#+end_src\n\nTo test it quickly\n\n#+begin_src shell\npython src/means_client.py\n#+end_src\n\nthen type the messages as:\n\n#+begin_src shell\nI,1,1|I,2,2|Q,1,2\n#+end_src\n\nwhere messages are delimited by pipe and each message is delimited by\ncomma. The script then sends an encoded message to the running server\nand prints the result of `Q`. \n\n* [[https://protohackers.com/problem/3][03 Budget Chat]]\n\n#+begin_src shell\ncargo run 3\n#+end_src\n\nThen connect with\n\n#+begin_src shell\nnc 127.0.0.1 8838\n#+end_src\n\nand again to chat!\n\n\n* [[https://protohackers.com/problem/4][04 Unusual Database Program]]\n\nBuild and run as follows\n\n#+begin_src shell\ncargo run 4\n#+end_src\n\nThen connect with\n\n#+begin_src shell\nnc -u 127.0.0.1 8838\n#+end_src\n\n\n* [[https://protohackers.com/problem/5][05 Mob in the Middle]]\n\nRun the unusual budget chat with \n\n#+begin_src shell\ncargo run 3\n#+end_src\n\nthen run this\n\n#+begin_src shell\ncargo run 5\n#+end_src\n\nThen connect with\n\n#+begin_src shell\nnc -u 127.0.0.1 8839\n#+end_src\n\n\n\n* [[https://protohackers.com/problem/6][06 Speed Daemon]]\n\n#+begin_src shell\ncargo run 6\n#+end_src\n\nto test\n\n#+begin_src shell\npython src/speed_daemon/client.py c1 c2 d\n#+end_src\n\n* Notes\n\n#+begin_src shell\nrsync -avz --exclude-from '.gitignore' ./ remoteuser@remoteserver:/path/to/remote/directory\n#+end_src\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoudel%2Fprotohacke-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoudel%2Fprotohacke-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoudel%2Fprotohacke-rs/lists"}