You can use several words in query to find by all of them at the same time. In addition, if you are lucky search understands word forms and some synonyms. It supports search by title and author. Examples:

  • 305 — search for 305, most probably it will find blogs about the Round 305
  • andrew stankevich contests — search for words "andrew", "stankevich" and "contests" at the same time
  • user:mikemirzayanov title:testlib — search containing "testlib" in title by MikeMirzayanov
  • "vk cup" — use quotes to find phrase as is
  • title:educational — search in title

Results

 
 
 
 
1.

toposort

Last visit:  7 years ago
Registered:  9 years ago
 
 
 
 
2.
By -Morass-, history, 4 years ago, In English
Problem Topics Good Day to you! I've been asked to make some topic-wise list of problems I've solved. Even though I couldn't involve all problems, I've tried to involve at least "few" problems at each topic I thought up (I'm sorry if I forgot about something "easy"). I've alredy made such list once anyway I've tried to include more problems now &mdash; so here it is: <spoiler summary="aho"> http://www.spoj.com/problems/ADAJOBS/ URI 2226 (5) //[NICE][NUMBERS][DP] http://www.spoj.com/problems/SUB_PROB/en/ http://codeforces.com/contest/696/problem/D 8 http://www.spoj.com/problems/AHOCUR/ 5 //Aho-Corassic + DP https://www.codechef.com/problems/LYRC (5) //Sample aho-brute-force http://codeforces.com/problemset/problem/346/B //Proposed by [user:bradyawn,2019-08-03] </spoiler> <spoiler summary="automat"> 6861 [LA] //CYK UVA 10679 //Suffix Automat http://www.spoj.com/problems/STRMATCH/ //Suffix Automat &mdash; trie might do too http://www.spoj.com/problems/NSUBST...
/102001/problem/G (4) //[NICE][BS] https://codeforces.com/gym/102006/problem/G (4) //[NICE][TOPOSORT, http://codeforces.com/contest/47/problem/B (2) //[EASY][Toposort on 3 elements], http://codeforces.com/contest/770/problem/C 4 //reduce + toposort, http://codeforces.com/contest/825/problem/E 4 //Toposort from biggest/backward, https://codeforces.com/gym/102006/problem/G (4) //[NICE][TOPOSORT][OBSERVATION]

Read more »

 
 
 
 
  • Vote: I like it
  • +428
  • Vote: I do not like it

 
 
 
 
3.
By vohrab1896, history, 11 months ago, In English
SPOJ-TOPOSORT - getting WA Hi all I am getting WA in SPOJ-TOPOSORT. I solved it using Kahn's Algorithm but getting WA. To get smallest value on second place I am picking up smallest value from the child nodes of the node present at the front of queue and then comparing it's value to other value present in the front of queue. This is the link- [https://ideone.com/Yur2cr]. I have given a lot of time to find the wrong test case but failed. If anyone is able to solve this then please let me know. Thanks
SPOJ-TOPOSORT - getting WA, Hi all I am getting WA in SPOJ-TOPOSORT. I solved it using Kahn's Algorithm but getting WA, I am getting WA in SPOJ-TOPOSORT. I solved it using Kahn's Algorithm but getting WA. To get

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

 
 
 
 
4.
By kazama460, 2 months ago, In English
(almost) Every Algorithms & Data Structures you needed to learn , with practice problems Hello guys this is <a href="https://www.youtube.com/channel/UC0zvY3yIBQTrSutsV-4yscQ?view_as=subscriber"> CodeNCode </a> and as you guys know I have been working for more than 3 years on Data Structures and algorithms courses. So I thought let's compile it to one place and share so it can be helpful to everyone. <h3>List of Courses</h3> <div class="spoiler"> <b class="spoiler-title"><h5> Basic Algorithms </h5></b> <div class="spoiler-content" style="display: none;"> <ul> <li><a href="https://www.youtube.com/watch?v=NoDYJ7Ks_M0">L01 : Why you should learn binary search</a></li> <li><a href="https://www.youtube.com/watch?v=3vMpagKkqrc">L02 : Understanding Core of Binary Search</a></li> <li><a href="https://www.youtube.com/watch?v=-IMyOkNLRoY">L03 : Monk's encounter with polynomial (HackerEarth)</a></li> <li><a href="https://www.youtube.com/watch?v=FJXZ4Zt8SOk">Ternary String (Codeforces)</a></li> ...
>L16 : TOPOSORT (SPOJ) <https://www.youtube.com/watch?v=bS62tit40m8> , ?v=bS62tit40m8">L16 : TOPOSORT (SPOJ)

Read more »

 
 
 
 
  • Vote: I like it
  • +308
  • Vote: I do not like it

 
 
 
 
5.
By ksun48, history, 5 years ago, In English
Editorial for CROC 2016 Elimination Round [problem:645A] --- **Idea:** [user:yummy,2016-03-18] One solution is to just brute force and use DFS to try all the possibilities. Alternatively, note that two puzzles can be changed to each other if and only if the $A$, $B$, and $C$ have the same orientation—clockwise or counterclockwise—in the puzzle. A third option, since the number of possibilities is so small, is to simply classify all of the $4!=24$ configurations by hand. <spoiler summary="Code"> ~~~~~ #include <bits/stdc++.h> using namespace std; string b, b1, b2, e, e1, e2; int main(){ cin >> b1 >> b2 >> e1 >> e2; swap(b2[0], b2[1]); swap(e2[0], e2[1]); b = b1 + b2; e = e1 + e2; b.erase(b.find('X'), 1); e.erase(e.find('X'), 1); if((b + b).find(e) != string::npos){ cout << "YESn"; } else { cout << "NOn"; } } ~~~~~ </spoiler> [problem:645B] --- **Idea: [user:ksun48,2016-03-18]** Loosely speaking, we’re trying t...
at time $k$ by running a toposort and checking if the longest path covers all $n$ vertices. This might, in this DAG via dynamic programming or a toposort., . Thus we can compute the longest path in this DAG via dynamic programming or a toposort. We now have

Read more »

 
 
 
 
  • Vote: I like it
  • +89
  • Vote: I do not like it

 
 
 
 
6.
By iamdumb, history, 6 years ago, In English
lexiographically smallest TOPOSORT I was doing [this question](http://www.spoj.com/problems/TOPOSORT/) from spoj.And as far as I have understood it,it requires to find lexiographically smallest toposorting of a DAG.I have studied toposorting from [here](http://e-maxx.ru/algo/topological_sort) but implementing it leads me to different toposorting.Can anybody explain me is there any way to find lexiographical toposort ?
lexiographically smallest TOPOSORT, I was doing [this question](http://www.spoj.com/problems/TOPOSORT/) from spoj.And as far as I have

Read more »

 
 
 
 
  • Vote: I like it
  • +11
  • Vote: I do not like it

 
 
 
 
7.
By LoppA, history, 4 years ago, In English
2-CNF Problem — Doubts Hi I'm having trouble with the 2-CNF (Conjuctive Normal Form) problem, not just 2-SAT but the more general case of Conjuctive Normal Forms, ie: a => b (a implies b), c => ¬d (c implies not d). I've got some doubts, if you can help me with any of them it would help me a lot. 1 &mdash; What is the answer for the case (a => b) and (b => ¬a) and (¬a => c) and (c => d) and (d => ¬c)? I think its not satisfiable but if you solve like 2-SAT by just checking for all x if x and ¬x are in the same SCC then getting the variable with higher toposort between (x and ¬x) as the answer you may come to a diferrent result. ![ ](http://codeforces.com/predownloaded/16/40/16409ff8134515ad5752bd8b64f4457f751d136f.png) 2 &mdash; There is an algorithm to find if some 2-CNF is solvable? And if its solvable how can we get some solution? 3 &mdash; If x or ¬x has not in edge nor out edge in the graph of implications, its correct to just set it as the answer? If you just get the toposort values like i...
SCC then getting the variable with higher toposort between (x and ¬x) as the answer you may come, and ¬x are in the same SCC then getting the variable with higher toposort between (x and ¬x, set it as the answer? If you just get the toposort values like in 2-SAT algorithms, x or ¬x can, Ex: (a => b) and (b => ¬a) and (¬a => c). If we dont treat it the toposort of ¬c can be grater than

Read more »

 
 
 
 
  • Vote: I like it
  • +41
  • Vote: I do not like it

 
 
 
 
8.
By kazama460, 16 months ago, In English
Graph Theory Course For Beginners : CodeNCode (YouTube) `Last Update 3 June 2020` `Hello codeforces community` ~~~~~ I have working on graph theory course which is beginner friendly.The course emphasizes on learning by doing methodology. After teaching an algorithm and showing how it is implemented I take example practice problems from judges like Codeforces , Codechef , Spoj etc and teach how this algorithm is used in different scenario and how it can be used to solve the problem. ~~~~~ ~~~~~ Here is the list of lecture from the course (I will be uploading more lectures) ~~~~~ Graph Theory Course : Part 1 ------------------ - L00 : [Course Overview](https://www.youtube.com/watch?v=VW85xQ6GJP4&list=PL2q4fbVm1Ik6DCzm9XZJbNwyHtHGclcEh&index=2&t=1s) - L01 : [Graph Representation](https://www.youtube.com/watch?v=8x7omPbQrPw&list=PL2q4fbVm1Ik6DCzm9XZJbNwyHtHGclcEh&index=3&t=0s) - L02 : [Depth First Search(DFS)](https://www.youtube.com/watch?v=rEa4014IxR8&list=PL2q4fbVm1Ik6DCzm9XZJbNwyHtHGclcEh&index=4&t=0s) - L03 : [Count...
=PL2q4fbVm1Ik6DCzm9XZJbNwyHtHGclcEh&index=29&t=0s) - L16 : [TOPOSORT (Spoj) | Practice Problem (added : 12 May

Read more »

 
 
 
 
  • Vote: I like it
  • +87
  • Vote: I do not like it

 
 
 
 
9.
By brdy, history, 3 years ago, In English
O(N + M) getting TLE on 2500 ms For some strange reason, my code to compress a directed graph into a DAG and run some process on it gets TLE on this problem [problem:894E]. This is strange, because N = M = 1e6 at maximum. In addition, I used to have a log factor which I removed (using math instead), but it still gets TLE on test case 14. My solution to the problem ([submission:41978175]) is pretty much same idea as editorial, up until the last point. Instead of running toposort/dp on the DAG, I just traverse down and take the maximum path, but complexity of the function should still be O(N+M). I am baffled by how this would TLE, can anybody give me some advice on constant optimizations or how the complexity could possibly be worse than imagined?
as editorial, up until the last point. Instead of running toposort/dp on the DAG, I just traverse down, the last point. Instead of running toposort/dp on the DAG, I just traverse down and take

Read more »

 
 
 
 
  • Vote: I like it
  • +15
  • Vote: I do not like it

 
 
 
 
10.
By code_warrior, history, 6 months ago, In English
Topological Sort on Complementary DAG Hello, friends. Recently, I was solving this problem[Topological Sort](https://codeforces.com/gym/101102/problem/K), but got stuck on it. I thought a lot for solving but couldn't come up with any efficient approach. There is even no tutorial available for it. My Approach (May or must be wrong, that's why i am getting wrong answer)-: For every node I am finding the first node greater than it to which it will be connected and also the largest node smaller than it which will connect to it. After forming a DAG in this way with no more than 2*n edges I ran toposort on it. But it's giving me wrong answer. See the drawing for understanding my approach. [This one](/predownloaded/b2/f9/b2f9db71de93408e0db4d99fd950630b9a8a0ce6.png) Can someone help me figuring out the way to solve this problem? I bet this is one of the most nice problems on graph theory.
to it. After forming a DAG in this way with no more than 2*n edges I ran toposort on it. But it's giving me

Read more »

 
 
 
 
  • Vote: I like it
  • +18
  • Vote: I do not like it

 
 
 
 
11.
By catismyfav, history, 15 months ago, In English
Help Needed in Cycle Detection in Graphs Hello all! I have started studying dfs and it's applications and I was studying topological sorting (https://www.spoj.com/problems/TOPOSORT/). I am stuck at the part to check the graph is Acyclic or not? Can anyone help with any easier way to check this? Thanks!
sorting (https://www.spoj.com/problems/TOPOSORT/). I am stuck at the part to check the graph is Acyclic

Read more »

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it