{"id":16736497,"url":"https://github.com/neizod/problems","last_synced_at":"2025-03-15T21:41:38.306Z","repository":{"id":5083274,"uuid":"6245523","full_name":"neizod/problems","owner":"neizod","description":"neizod's solution to math \u0026 com-sci problems","archived":false,"fork":false,"pushed_at":"2021-05-26T09:34:32.000Z","size":1311,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-22T10:41:45.626Z","etag":null,"topics":["algorithm","computer-science","mathematics","problems-solving"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"lwfinger/rtl8188eu","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neizod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-16T14:18:46.000Z","updated_at":"2021-05-26T09:34:35.000Z","dependencies_parsed_at":"2022-07-08T10:20:53.659Z","dependency_job_id":null,"html_url":"https://github.com/neizod/problems","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neizod%2Fproblems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neizod%2Fproblems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neizod%2Fproblems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neizod%2Fproblems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neizod","download_url":"https://codeload.github.com/neizod/problems/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243796565,"owners_count":20349251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["algorithm","computer-science","mathematics","problems-solving"],"created_at":"2024-10-13T00:22:38.281Z","updated_at":"2025-03-15T21:41:38.285Z","avatar_url":"https://github.com/neizod.png","language":"Python","readme":"Problems Solving\n================\n\n    /!\\ Caution:\n        Reading through this solutions might be spoiling yourself.\n\nThis repository contains my (public) problem-solving solutions.\n\n\nCompile, Run, and Test\n----------------------\n\nIf any, input from `stdin` will be provide with `input.in` file. Look out for some problems that I might not provide `input.in` myself -- such as in Code Jam directory. You can find the input from their site.\n\n\n### Python\n\nAll solutions in Python is written for version 3 of the language (i.e. use `python3` to run), somes might compatible with `python2` or `pypy`. I've already dump a shebang header that point to `python3` in most (but not all) of the solutions, but testing with other version still possible by specify name of interpreter from command line. e.g.\n\n    $ head solution.py\n    #!/usr/bin/env python3\n    ...\n    $ ./solution.py                     # invoke program with python3 as an interpreter.\n    $ python3 solution.py               # same as above.\n    $ pypy solution.py                  # invoke program with pypy as an interpreter.\n\nAlso if some solutions is written in 1-linear style, file extension will be ended with `.1l.py`, hope you like it :D\n\n    $ ./solution.1l.py                  # sould be same as ./solution.py\n\n\n### C++\n\nCompile with C++11 standard, or above. e.g.\n\n    $ g++ --std=c++11 solution.cpp      # use C++11 standard.\n    $ g++ --std=c++0x solution.cpp      # same(?) as above.\n    $ g++ --std=c++1y solution.cpp      # use C++14 standard, not yet accepted by some judges.\n\nSet default compiling option can also be done within `.bashrc` this way:\n\n    $ grep g++ ./bashrc\n    alias g++=\"g++ --std=c++11\"\n    $ g++ solution.cpp                  # now use C++11 standard by default.\n    $ \\g++ solution.cpp                 # fall back to C++98 standard.\n\nIf not given output filename, a solution file will be named `a.out`, so here is how to invoke it:\n\n    $ ./a.out                           # invoke program\n\n\n### Haskell\n\nTwo options here: for quick test use `runhaskell` to interprete code on the fly, or for timing real usage, compile with `ghc` first then run.\n\n    $ runhaskell solution.hs            # fast: interprete code on the fly.\n    $ ghc solution.hs                   # faster: compile first run later.\n    $ ghc -O2 solution.hs               # fastest: tell compiler to optimize it.\n    $ ./solution                        # invoke program\n\n### Smart Testing\n\nA simple way to test is to type in all this text:\n\n    $ ./solution                        # or ./a.out, or ./solution.py, or blah blah blah\n    input line 1\n    input line 2\n    input line ...\n    Ctrl-D                              # require by some problems that need EOF at the end.\n    output line 1\n    output line 2\n    output line ...\n\nTo save those typing strokes (and reduce typing errors), a redirection technique can be use here with `\u003c\u003c` symbol, follow by EOF mark, input text, and EOF mark again. e.g.\n\n    $ ./solution \u003c\u003c E\n    input line 1\n    input line 2\n    input line ...\n    E\n    output line 1\n    output line 2\n    output line ...\n\nOr save the entire input text to a file. This time use just `\u003c` then follow by filename. Be sure to end line in UNIX style (`\\n`), not Windows style (`\\r\\n`).\n\n    $ cat problem.in\n    input line 1\n    input line 2\n    input line ...\n    $ ./solution \u003c problem.in    \n    output line 1\n    output line 2\n    output line ...\n\nFinally, this test can be nearly full automation with the use of `diff` program, and `answer.out` output file. i.e.\n\n    $ ./solution \u003c problem.in | diff - answer.out\n    $                                   # corrected answer will return prompt w/o complain.\n\n\n### Clean Up\n\nAfter testing programs, you might want to run `git clean -df` to delete compiled solution from harddisk to save spaces. This action will also delete other files that is not yet recognize into Git repository, so use with your own risk.\n\n\nProblems Source\n---------------\n\n- ACM-ICPC\n- Google Code Jam\n- Code Forces\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneizod%2Fproblems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneizod%2Fproblems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneizod%2Fproblems/lists"}