background preloader

Problems

Problems

Articles | ACMSolver By DmitryKorolev (collected from Topcoder) ContainersBefore we beginVectorPairsIteratorsCompiling STL ProgramsData manipulation in VectorStringSetMapNotice on Map and SetMore on algorithmsString StreamsSummary Perhaps you are already using C++ as your main programming language to solve TopCoder problems. Or perhaps you are not a C++ programmer, but want to become one because of the great functionality of this language and its libraries (and, maybe, because of the very short solutions you’ve read in TopCoder practice rooms and competitions). Regardless of where you’re coming from, this article can help. The simplest way to get familiar with STL is to begin from its containers. Containers Any time you need to operate with many elements you require some kind of container. The problem is not that arrays are limited (though, for example, it’s impossible to determine the size of array at runtime). For example, we may need one or more of the following operations: #include <stack> vector<int> N;

BetterExplained Python ACMSolver :: Art of Programming Contest, Tips and Tricks. Khan Academy Welcome to Linux From Scratch! CS 97SI: Introduction to Competitive Programming Contests Course Information and Announcements Instructor: Jaehyun ParkStanford ACM-ICPC Coaches: Jaehyun Park, Andy Nguyen, Jerry Cain(Added on 8/21/2013) This class was taught in 2011-12 Winter. I'm getting a lot of emails asking if I'm teaching it again, but there is no plan to offer the course at the moment. Lecture slides Practice Problems All the problems below are from Peking Online Judge (POJ). Problems are classified into 10 different categories, and the lectures will cover essential algorithms and theoretical background for each particular category. The numbers in parentheses represent the difficulty of the problems (0: easiest, 10: hardest). Common coding mistakes Not initializing variablesUsing 32-bit integers instead of 64-bit onesUsing out-of-bound array indicesUsing a semicolon after a for loop for(i = 0; i < n; i++); some code Reusing the same variable in nested for loops for(i = 0; i < 1000; i++) for(i = 0; i < 10; i++) some code #define min(a, b) a<b? Writing cos(180) instead of cos(pi)

Top 40 Useful Sites To Learn New Skills The web is a powerful resource that can easily help you learn new skills. You just have to know where to look. Sure, you can use Google, Yahoo, or Bing to search for sites where you can learn new skills , but I figured I’d save you some time. Here are the top 40 sites I have personally used over the last few years when I want to learn something new. Hack a Day - Hack a Day serves up fresh hacks (short tutorials) every day from around the web and one in-depth ‘How-To hack’ guide each week.eHow - eHow is an online community dedicated to providing visitors the ability to research, share, and discuss solutions and tips for completing day-to-day tasks and projects.Wired How-To Wiki - Collaborate with Wired editors and help them build their extensive library of projects, hacks, tricks and tips.

Arch Linux SVDLIBC A C Library for Computing Singular Value Decompositions version 1.4 SVDLIBC is a C library written by Doug Rohde. It was based on the SVDPACKC library, which was written by Michael Berry, Theresa Do, Gavin O'Brien, Vijay Krishna and Sowmini Varadhan at the University of Tennessee. SVDLIBC is made available under a BSD License. SVDLIBC offers a cleaned-up version of the code with a new library interface and a front-end executable that performs matrix file type conversions, along with computing singular value decompositions. Installing To install SVDLIBC: Click here to download the tar file.To unpack the tar file run this on the command-line:tar xvzf svdlibc.tgz cd SVDLIBCYou may want to edit the Makefile to use your favorite compiler. Command-line Interface The command-line interface, svd, allows you to perform an SVD on a matrix, optionally storing the left- and right-singular vectors and the singular values in separate files. C Library Interface The library defines three structures.

Linux Links - The Linux Portal Tutorial: The best tips & tricks for bash, explained The bash shell is just amazing. There are so many tasks that can be simplified using its handy features. This tutorial tells about some of those features, explains what exactly they do and learns you how to use them. Difficulty: Basic – Medium Running a command from your history Sometimes you know that you ran a command a while ago and you want to run it again. Repeating an argument You can repeat the last argument of the previous command in multiple ways. [rechosen@localhost ~]$ mkdir /path/to/exampledir [rechosen@localhost ~]$ cd ! The second command might look a little strange, but it will just cd to /path/to/exampledir. Some keyboard shortcuts for editing There are some pretty useful keyboard shortcuts for editing in bash. Dealing with jobs If you’ve just started a huge process (like backupping a lot of files) using an ssh terminal and you suddenly remember that you need to do something else on the same server, you might want to get the huge process to the background. And: And so on.

Related: