CommonLounge is a community of learners who learn together. Get started with the featured resources above, ask questions and discuss related stuff with everyone.
Need help For INOI
I need some help about what exactly should I do for inoi
My prob is i am confused about which dp topics to do and which to not. For example dp with bit masking is required or not. Also there were many many topics on geeks for geeks and i couldnt get which ones to do as time is limited. It is nowhere mentioned on iarcs etc. Which questions of dp go beyond inoi level? Also is there a need to do segment trees ( i have no idea about it).
This playlist is mostly based on IARCS syllabus and previous years' papers' trends.
Read more… (23 words)
Read more (23 words)
Introduction to Graphs (and how to represent them)
I recommend watching the following videos for learning about graphs. These are really well made videos and he covers a lot in these short videos, so if you feel overwhelmed, use the rewind and pause buttons.
Introduction to Graphs
What are graphs? What are different types of graphs (directed and undirected, trees and DAGs, etc)? And examples of using them to model web links, flights between cities, and other things.
In the most of the text/video tutorials,vertices are always( as far as I've noticed) represented by integers ( from 0 to any positive integer). Is this always the case?? I ponder if we're dealing with real life,then vertices would be an object,right??
For those of you who haven't solved this problem, this is one of the best problems from which you can learn how limitations of memory and time can make an easy problem, difficult to solve!
Just when I obtained the accepted sign after several trials, I was quite disappointed that I got a worst case running time of 1.98 s . So I headed over to Keshav's github repository and when I tried out the solution posted, it gave me a worst case running time of 0.024 s. Wow! Now that's a huge improvement. I really wanted to upgrade my arsenal with the procedure that had been used, but to my dismay I couldn't understand how it actually works. It would be great if someone posted the technique and procedure employed in solving the problem in the link attached above!
What is the best way to represent adjacency lists in C++98
INOI is coming up soon, and seeing that only C++98 was provided in ZCO, I won't be surprised (but would be upset) that they provide the same in INOI.
Normally I represent undirected graphs as an unordered_map of vectors, like this:
unordered_map <int, vector <int>> graph;
For directed graphs, I may use an unordered_map of unordered_maps to store the weights.
However, what is the best way to do so in C++98, especially for sparse graphs. Do I have to resort to something like: int graph[n][n] which would consume quite a lot of space, as it is basically just an adjacency matrix.
Discussion and all matter is fit for the title for the sores for the field. Improvement of the team and type for me for the content. The link displaced for the approval of the true way for the turns for the ways for all offer for the count and dumping of the sights.
Problem in short: Given a positive integer N, find the number of binary strings of length N which are not periodic. Report the answer modulo M. The non-periodic strings of length 3 are 001, 010, 011, 100, 101, and 110. N <= 150,000.
Indian National Olympiad in Informatics (INOI) is round 2 out of 3 (i.e. intermediate) for selection into Indian IOI team.