Giter Club home page Giter Club logo

stanfordacm's Introduction

Stanford ACM-ICPC

This is a repository for the Stanford ACM-ICPC teams. It currently hosts (a) the team notebook, and (b) complete lecture slides for CS 97SI.

The team notebook is compiled from codes written by previous Stanford team members and coaches.

Generating team notebook

The included Python scripts can generate the notebook in PDF or HTML format. Both scripts read the contents of the notebook from contents.txt.

PDF version

Requires: Python 2/3, latexmk

Script for generating the PDF file is generate_pdf.py. The LaTeX template that the script uses is notebook.tex. It recognizes common file extensions for C/C++/Java/Python and applies syntax highlighting. In order to change the color scheme or add additional languages, both notebook.tex and generate_pdf.py should be modified accordingly.

HTML version

Requires: Python 2/3, enscript

Script for generating the HTML file is generate_html.py. Syntax highlighting is handled solely by enscript, and in order to change the color schemes, either the default options of enscript or generate_html.py should be edited accordingly.

Links

stanfordacm's People

Contributors

gharrma avatar himuhasib avatar imnirdst avatar jaehyunp avatar joshuarwang avatar madhur4127 avatar pin3da avatar simonlindholm avatar wewark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stanfordacm's Issues

LongestIncreasingSubsequence Bug

The following code prints 5 3 4.

int main() {
  auto res = LongestIncreasingSubsequence(vector<int>({5,6,2,3,4}));
  for (auto i : res)
      cout << i << " ";
  cout << endl;
}

Incorrect result on an example graph

Hi
I tried the code with the following edge costs:

int cost3[][] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 2, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 2, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 2, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 1}, { 0, 0, 0, 0, 0, 0, 0, 0, 0} };
and the following edge capacities:
`int cap3[][] = { { 0, 1, 1, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, INF, 0, 0, INF, 0 },
{ 0, 0, 0, 0, 0, INF, 0, INF, 0 },
{ 0, 0, 0, 0, 0, 0, INF, INF, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, INF },
{ 0, 0, 0, 0, 0, 0, 0, 0, INF },
{ 0, 0, 0, 0, 0, 0, 0, 0, INF },
{ 0, 0, 0, 0, 0, 0, 0, 0, 2 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0 }

    };`

Your code gave the result 1 2, whereas, I think the result should be 2 2.
I am trying to represent a directed graph here. It is best visualized as an n-partite graph. In the first column, you have node 0, in the second column you have nodes 1, 2 and 3. In the third column, you have nodes 4, 5, 6 and 7. In the last column you have node 8.
Node 0 has edges to nodes 1, 2 and 3 with 0 edge cost and infinite edge capacity. Node 1 has edges to nodes 4 and 7. The edge from 1 to 4 has edge cost 2 and infinite capacity, whereas the edge from 1 to 7 has edge cost 0 and infinite capacity. Node 2 has similar edges to nodes 5 and 7. Node 3 has similar edges to nodes 6 and 7. Nodes 4, 5 and 6 have edges to node 8 with cost 0 and infinite capacity. Node 7 has an edge to node 8 with cost 1 and capacity 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.