Competitive programming contest 355
Project · course project · 2024
Competitive programming contest 355 holds problems and solutions for a contest in a competitive-programming course at Chiang Mai University. Each problem comes with a statement, an explanation and test cases, 40 in all.
An example: Fibonacci modulo m
One problem asks for the *n*th Fibonacci number modulo m, for very large n. Computing the Fibonacci number first is hopeless at that size. The solution uses the Pisano period: the remainders of the Fibonacci sequence modulo m repeat in a cycle. So it finds the cycle's length and reduces n modulo that length first.
Engineering
The solutions are in C++ and C, built with CMake and a Makefile, formatted with clang-format and documented with Doxygen. GitHub Actions workflows check the code.
See also
In the knowledge graph
Competitive programming contest 355 and the 12 things it is linked to. Open any dot for its page, or explore it in the full graph.
As data
Everything on this page is read from triples in the knowledge graph. These are the 26 it states about Competitive programming contest 355, and 2 more its ontology implies; the console runs SPARQL over the whole graph, here in your browser.
@prefix id: <https://ask.chaipat.cc/id/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix cj: <https://ask.chaipat.cc/ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . id:Contest355 a cj:Project ; rdfs:label "Competitive programming contest 355" ; cj:description "Problems and solutions for a competitive-programming course contest." ; cj:context id:CMU ; cj:repository "https://github.com/AppleBoiy/competitive-contest-355"^^xsd:anyURI ; cj:firstCommit "2024-01-22"^^xsd:date ; cj:lastCommit "2024-03-31"^^xsd:date ; cj:commitCount 34 ; cj:kind "course project" ; cj:theme id:ThemeAlgorithms , id:ThemeTeaching ; cj:uses id:CPP , id:C , id:GitHubActions , id:CMake , id:Doxygen , id:ClangFormat , id:Make ; cj:tier 2 ; cj:implements id:PisanoPeriod ; cj:mentions id:CMSUbuntu ; cj:article "https://ask.chaipat.cc/wiki/Contest355"^^xsd:anyURI ; cj:activeIn id:Y2024 ; cj:activity _:b12 , _:b13 , _:b14 .