Daily Diary (Competitive Coding in Summers)
Difference between en22 and en23, changed 969 character(s)
I realised that there is only one way improve one's skill, and that is through practice. So I decided to practice more topics and more problems on codeforces and different judges. This is simply a daily record for what I did through my vacation. ↵

I also want to tell you about **stopstalk.com** . It is a good site to make and keep you daily coding record.↵

##**16 MAY 2017**↵

##### **Problems Solved** -↵
###### 1. http://codeforces.com/problemset/problem/535/D↵
        This was a simple problem and it used Z function for prefix length calculation↵
###### **solution link** — http://codeforces.com/contest/535/submission/27152004↵

###### 2. http://codeforces.com/problemset/problem/551/B↵
        Although the problem was simple, I had some trouble in understanding the language of the problem. It took time more than required. ↵
###### **solution link** — http://codeforces.com/contest/551/submission/27160921↵
<br>↵

##### **Participated Contest** - ↵
I participated in a virtual contest ( **Round 308 DIV 2** ). I was able to solve all the problems, but then last problem was accepted just 2 min before the contest ended. ↵

###### A. http://codeforces.com/problemset/problem/552/A↵
    The problem was fairly simple, but then rather than simply adding the area, I made a 2-D hash map. Guess I have to practice a little more for problem A.↵
###### **solution link** &mdash; http://codeforces.com/contest/552/submission/27165795↵

###### B. http://codeforces.com/problemset/problem/552/B↵
    The problem was mathematical. I solved it by forming a series. Got one WA for not using long long.↵
###### **solution link** &mdash; http://codeforces.com/contest/552/submission/27165912↵

###### C. http://codeforces.com/problemset/problem/552/C↵
    I solved the problem using meet in middle. But the editorial talked about an another wonderful way to solve that. Do watch the editorial solution. It is an excellent concept in itself.↵
###### **solution link** &mdash; http://codeforces.com/contest/552/submission/27166275↵
    ↵
###### D. http://codeforces.com/problemset/problem/552/D↵
    This was another interesting problem to solve. I used concept of slopes to generate triangle. Got 4 WA. Was not taking care of slope sign and was not handling 0 slope and inf slope cases.↵
###### **solution link** &mdash; http://codeforces.com/contest/552/submission/27166893↵

###### E. http://codeforces.com/problemset/problem/552/E↵
    Pretty interesting problem to solve both by greedy and by DP. I used the later N*N approach. Initially thought of using multiplication as boundaries, but then didn't wanted to take risk. Got 4 WA because of simple mistakes in the loops. Got accepted just before 2 min from end. ↵
###### **solution link** &mdash; http://codeforces.com/contest/552/submission/27167519 ↵


## 17 MAY 2017↵

Solved very few problems. Found a lot of problems hard to solve.↵

##### Problems Solved - ↵

###### 1. http://codeforces.com/problemset/problem/551/C↵
    It was a good problem of binary search. Although I found it a little hard for problem C Div 2. Guess I have practice still more. It used an standard NlogN solution using binary search where we have to binary search over the completion time of the task and then check the users required. Good problem for practice.↵
###### solution link &mdash; http://codeforces.com/contest/551/submission/27175198↵

###### 2. http://codeforces.com/problemset/problem/549/A↵
    Fairly easy problem. Requires direct implementation↵
###### solution link &mdash; http://codeforces.com/contest/549/submission/27181042↵

###### 3. http://codeforces.com/problemset/problem/534/E↵
    very good problem for practice. I was missing a lot of corner cases while solving. Had to search for a method to find mismatch in logN time in the array. I think this problem was worth solving. ↵
###### solution link &mdash; http://codeforces.com/contest/534/submission/27184116↵

##### Problems Unsolved - ↵

###### 1. http://codeforces.com/problemset/problem/534/F↵
###### 2. http://codeforces.com/contest/549/problem/H↵

###### It would be a great help if someone could help me with the unsolved problems.↵

## 18 MAY 2017↵

##### Problems Solved - ↵

I solved some simple problems on hackerearth and URI. One problem that I liked was from URI &mdash; ↵

###### 1. https://www.urionlinejudge.com.br/judge/en/problems/view/1469↵
    This was a good problem where we had to swap nodes. I used map for mapping and index function and an inverse index function for getting position of a node and getting value at any position. for swapping, I swapped those two.↵
###### solution link &mdash; https://code.hackerearth.com/a4c9b2Y ↵

Then some problems on codeforces <br>↵

###### 1. http://codeforces.com/problemset/problem/549/H↵
    Finally solved the matrix problem. Used binary search for reducing the size of squares.↵
###### solution link &mdash; http://codeforces.com/contest/549/submission/27189164↵

###### 2. http://codeforces.com/problemset/problem/519/A↵
    Direct implementation↵
###### solution link &mdash; http://codeforces.com/contest/519/submission/27193319↵

###### 3. http://codeforces.com/problemset/problem/519/B↵
    Direct implementation↵
###### solution link &mdash; http://codeforces.com/contest/519/submission/27201264↵

###### 4. http://codeforces.com/problemset/problem/519/C↵
    Turned out to be easy for problem C. Just travel over one possible value, then find the value of other and then maximise the sum.↵
###### solution link &mdash; http://codeforces.com/contest/519/submission/27201384↵

###### 5. http://codeforces.com/problemset/problem/519/D↵
    Had fun while solving this. Used map to store pairs of character and prefix sum values. Then used a linear algorithm to add values for all location while deleting previously occurred nodes. Did in NlogN.↵
###### solution link &mdash; http://codeforces.com/contest/519/submission/27202224↵

##### Problems unsolved - ↵

###### 1. http://codeforces.com/problemset/problem/519/E↵

## 19 MAY 2017↵

I only participated in a virtual contest on URI. Few of the good problems were &mdash; ↵

###### 1. https://www.urionlinejudge.com.br/judge/en/problems/view/2049↵

<spoiler summary="Hint">↵
The problem was fairly easy but the statement was bit confusing.↵
###### solution link &mdash; https://code.hackerearth.com/1144e5D↵
</spoiler>↵

###### 2. https://www.urionlinejudge.com.br/judge/en/problems/view/1923↵

<spoiler summary="Hint">↵
Again the main problem was decoding the statement. The only place that mentioned that the graph was undirected was when the statement said the relation is mutual. But while reading the problem you will feel like the graph is directed.↵
###### solution link &mdash; https://code.hackerearth.com/c2f17dC ↵
</spoiler>↵

###### 3. https://www.urionlinejudge.com.br/judge/en/problems/view/1580↵

<spoiler summary="Hint">↵
It was a basic mathematics problem that used mod inverse and factorial. ↵
###### solution link &mdash; https://code.hackerearth.com/eddc17Y↵
</spoiler>↵

## 20 MAY 2017↵

Today I solved problems on snackdown qualifiers and hackerearth circuits. In night, I participated in round 415 DIV 2. The results were not very good. Was only able to solve 3 problems. I feel like I have difficulty with interactive problems. Will have to practice more.↵

Apart from the contests, I solved an extra problem on hackerrank.↵

1. https://www.hackerrank.com/challenges/kth-ancestor↵

<spoiler summary="Hint">↵
The problem required to find the kth ancestor with dynamic insertion and deletion. I used an array to keep track of active elements. Then, for insertion and deletion, I used dp on that particular node. It only required logN steps. Finding the solution was then easy. For insertion in beginning, I used level order traversal to insure that the parent are inserted before the child. Good problem to practice.↵
###### solution link &mdash; https://code.hackerearth.com/3332f9b↵
</spoiler>↵

## 21 MAY 2017↵

Today I practise some problems on codeforces and spoj.↵

###### 1. http://www.spoj.com/problems/LCA/↵

<spoiler summary="Hint">↵
It was a simple problem of finding the LCA of a given pair of nodes. I used dp to solve the problem. Another possible way is to do an euler tour of the tree and then use RMQ to find the LCA. sparse tree can answer RMQ in constant time, so that will be faster.↵
###### solution link &mdash; http://paste.ubuntu.com/24622053/↵
</spoiler>↵

 ↵

###### 2. http://codeforces.com/problemset/problem/192/E↵

<spoiler summary="Hint">↵
First increase the count of the nodes that are given to you. The decrease the count of their LCA by 2. The thing is, we are going up level by level. At any given level at a time. We see how many fools can go up a level. That is equal to fool that came to that level minus the fool that stay at that level node. The number of fool staying was done by subtracting at LCA as they want to meet at a path of minimum distance.↵
###### solution link &mdash; http://codeforces.com/contest/192/submission/27263078↵
</spoiler>↵

###### 3. http://codeforces.com/problemset/problem/556/A↵

<spoiler summary="Hint">↵
It requires simple counting of one and zero. Giving it some time will directly lead to this conclusion↵
###### solution link &mdash; http://codeforces.com/contest/556/submission/27264409↵
</spoiler>↵

###### 4. http://codeforces.com/problemset/problem/556/B↵

<spoiler summary="Hint">↵
The problem was really simple. It only required implementation. One can easily come up with an N*N solution. As soon as one come up with an N*N solution, One can easily reduce it to an O(N) solution. link for both solution &mdash; ↵
###### link1 &mdash; http://codeforces.com/contest/556/submission/27266299↵
###### link2 &mdash; http://codeforces.com/contest/556/submission/27266356↵
</spoiler>↵

###### 5. http://codeforces.com/problemset/problem/556/C↵

<spoiler summary="Hint">↵
It was among the most confusing problem statement that I can across in my life. Even after reading it 4 &mdash; 5 time, I was unable to understand what actually was going on. So here is a simple problem statement. One can remove one doll at a time and that too only the uppermost. It means that the only chain that we don't have to break is the chain 1, 2, 3, 4 ... k. and then break every other doll and the n assemble over the k length chain.↵
###### solution link &mdash; http://codeforces.com/contest/556/submission/27266874↵
</spoiler>↵

###### 6. http://codeforces.com/problemset/problem/556/D↵

<spoiler summary="Hint">↵
It was an amazingly good problem of greedy using binary search as a sub routine. It took some time to come up with the solution. I made an array that had distance (max distance b/w boundaries, min distance b/w boundaries). Then sorted them according to the max distance. Then while traversing, I gave the shortest possible length of bridge to the required gap. If it was not possible, then answer was no.↵
###### solution link &mdash; http://codeforces.com/contest/556/submission/27270654↵
</spoiler>↵

## 22 MAY 2017↵

Today was an extremely bad day for me. I participated in a virtual contest and was able to solve only 2 problems. Realised how bad I am at geometry. So tomorrow is going to be an extensive practice session. I also solved one problem on hackerearth circuits. A bad day :(↵

## 23 MAY 2017↵

Today I solved a few problems and participated in a virtual contest. Guess something went wrong with CF. In the middle of virtual contest, It dumped me out of the contest, and when 45 min were left, It again brought back me in. I solved One problem on hackerearth circuits. ↵

##### solved problems ↵

###### 1. http://codeforces.com/problemset/problem/471/A↵

<spoiler summary = "Hint">↵
The problem was easy, But I took a lot of time to code. Just had to check whether there we some points greater equal 4. If not then alien, otherwise can be checked for bear and elephant.↵
###### solution link &mdash; http://codeforces.com/contest/471/submission/27301710↵
</spoiler>↵

###### 2. http://codeforces.com/problemset/problem/471/B↵

<spoiler summary="Hint">↵
Again an easy problem with more coding at least for me. Direct implementation.↵
###### solution link &mdash; http://codeforces.com/contest/471/submission/27301694↵
</spoiler>↵

###### 3. http://codeforces.com/problemset/problem/471/C↵

<spoiler summary = "Hint">↵
An easy problem with observation. Just found out the minimum card required for any height and then checked whether other cards can be arranged accordingly. Easy for C.↵
###### solution link &mdash; http://codeforces.com/contest/471/submission/27301680↵
</spoiler>↵

###### 4. http://www.codeforces.com/problemset/problem/471/D↵

<spoiler summary="Hint">↵
The D problem was easier than C. Can be solved using string matching. Instead of matching the strings, just match the steps. Solution will be clearer.↵
###### solution link &mdash; http://codeforces.com/contest/471/submission/27301654↵
</spoiler>↵

###### 5. http://codeforces.com/problemset/problem/208/E↵

<spoiler summary="Hint">↵
An easy problem for E. Can be solved just with dfs and binary search. I have two solutions↵
###### solution1 &mdash; http://codeforces.com/contest/208/submission/27306354↵
###### solution2 &mdash; http://codeforces.com/contest/208/submission/24803199↵
</spoiler>↵

###### 6. https://www.hackerrank.com/challenges/inverse-rmq↵

<spoiler summary="Hint">↵
The best problem I solved in day. Try to put minimum number node in as early index as possible. That is it.↵
###### solution link &mdash; http://paste.ubuntu.com/24640971/↵
</spoiler>↵

## 24 MAY 2017↵

Still doing hackerearth circuits. Unable to do consecutive remainder. Still have to practice more maths. ↵

## 25 MAY 2017↵
Practiced some easy problems on hackerearth and codeforces. The problems that I practiced on hackerearth were very easy. I cannot say the same for codeforces. Today's question were a bit harder.↵

###### 1. http://codeforces.com/problemset/problem/609/E↵

<spoiler summary="Hint">↵
The problem was of finding mst including a particular edge. The problem required finding the maximum length path joining the the two vertices. Let us say the edge weight cam out to be x, and the weight of the included edge is y, The cost of mst is z. Then ans is z &mdash; x + y.↵
###### solution &mdash; http://codeforces.com/contest/609/submission/27330146↵
</spoiler>↵

###### 2. http://codeforces.com/problemset/problem/519/E↵

<spoiler summary="Hint">↵
Coming up with a solution is an easy task. The hard part lies only in the implementation. Just need to find an equidistance path from both nodes and then count all node reachable from the node such that we do not go in the path of the given two vertices.↵
###### solution &mdash; http://codeforces.com/contest/519/submission/27330636↵
</spoiler>↵

###### 3. http://codeforces.com/problemset/problem/560/C↵

<spoiler summary="Hint">↵
The problem was of geometry and we just had to convert the hexagon in a triangle by drawing triangle on any three alternate edges.↵
###### solution link &mdash; http://codeforces.com/contest/560/submission/27331484↵
</spoiler>↵

###### 4. http://codeforces.com/problemset/problem/560/D↵

<spoiler summary="Hint">↵
Just needed to convert both the string into lexicographical smallest. Then compare whether the given two string are equal.↵
###### solution link &mdash; http://codeforces.com/contest/560/submission/27333242↵
</spoiler>↵

###### 5. http://codeforces.com/problemset/problem/560/E↵

<spoiler summary="Hint">↵
The problem was of combinatorics. Just needed to find the ways of going to a particular point without going on any other point that lies before it. the ans was C(x+y, x);↵
###### solution &mdash; http://codeforces.com/contest/560/submission/27340300↵
</spoiler>↵

## 26 MAY 2017↵

###### 1. https://www.hackerearth.com/practice/algorithms/greedy/basics-of-greedy-algorithms/practice-problems/algorithm/little-monks-interviews/↵

<spoiler summary="Hint">↵
Simple Maximum spanning tree.↵
###### solution &mdash; http://paste.ubuntu.com/24675192/↵
</spoiler>↵

###### 2. https://www.hackerearth.com/practice/algorithms/greedy/basics-of-greedy-algorithms/practice-problems/algorithm/rjit-need-leaves/↵

<spoiler summary = "Hint">↵
We just have to traverse in reverse direction. If we get x+1 for any x, we replace that x by x+1 in the multiset.↵
###### solution &mdash; http://paste.ubuntu.com/24675209/↵
</spoiler>↵

###### 3. https://www.codechef.com/problems/COOK82D↵

<spoiler summary="Hint">↵
Can make a hash for every node using some random value. then check whether the hash value of r and l-1 are same.↵
###### solution &mdash; http://paste.ubuntu.com/24675224/↵
</spoiler>↵

## 27 MAY 2017↵

###### 1. http://codeforces.com/problemset/problem/811/B↵

<spoiler summary="Hint">↵
Direct implementation↵
###### solution &mdash; http://codeforces.com/contest/811/submission/27392467↵
</spoiler>↵

###### 2. http://codeforces.com/problemset/problem/558/B↵

<spoiler summary = "Hint">↵
Can be solved by storing frequency, first occurrence and last occurrence.↵
###### solution &mdash; http://codeforces.com/contest/558/submission/27391836↵
</spoiler>↵

###### 3. http://codeforces.com/problemset/problem/557/A↵

<spoiler summary = "Hint">↵
simple greedy.↵
###### solution &mdash; http://codeforces.com/contest/557/submission/27367632↵
</spoiler>↵

###### 4. http://codeforces.com/problemset/problem/557/B↵

<spoiler summary="Hint">↵
just sort the array. find minimum size for both boys and girls. Using this we can find the amount x.↵
Then print minimum of 3*x or w.↵
###### solution &mdash; http://codeforces.com/contest/557/submission/27367886↵
</spoiler>↵

###### 5. http://codeforces.com/problemset/problem/557/C↵

<spoiler summary = "Hint">↵
Can be solved using simple brute force. Find total sum, and for every length find the maximum sum that you can save.↵
###### solution &mdash; http://codeforces.com/contest/557/submission/27389540↵
</spoiler>↵

###### 6. http://codeforces.com/problemset/problem/811/A↵

<spoiler summary = "Hint">↵
Direct brute force.↵
###### solution &mdash; http://codeforces.com/contest/811/submission/27371224↵
</spoiler>↵

###### 7. http://codeforces.com/problemset/problem/811/C↵

<spoiler summary = "Hint">↵
had to come up with a linear state to save memory limit exceed. N*N complexity. For every possible end, search for the corresponding start.↵
###### solution &mdash; http://codeforces.com/contest/811/submission/27385042↵
</spoiler>↵

## 28 MAY 2017↵

###### 1. https://www.codechef.com/problems/DIVGAME↵

<spoiler summary="Hint">↵
The best hint for this question would be to first try for upto 100000 and then try to find the pattern. Also there are few diversions from regular pattern at few places. ↵
###### solution &mdash; http://paste.ubuntu.com/24703147/↵
</spoiler>↵

###### 2. https://www.hackerearth.com/practice/algorithms/greedy/basics-of-greedy-algorithms/practice-problems/algorithm/little-monk-and-his-toy-story/↵

<spoiler summary = "Hint">↵
Direct brute force↵
###### solution &mdash; http://paste.ubuntu.com/24703165/↵
</spoiler>↵

###### 3. https://www.hackerearth.com/problem/algorithm/even-sum/↵

<spoiler summary="Hint">↵
It is actually a dp problem. Try to find the number of even sequence starting and ending at a particular point.↵
###### solution &mdash; http://paste.ubuntu.com/24703194/↵
</spoiler>↵

###### 4. https://www.hackerearth.com/practice/algorithms/greedy/basics-of-greedy-algorithms/practice-problems/algorithm/little-monk-and-library/↵

<spoiler summary="Hint">↵
Just Greedily allocate first to first.↵
###### solution &mdash; http://paste.ubuntu.com/24703210/↵
</spoiler>↵

## 29 MAY 2017↵

###### 1. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/sorted-string/↵

<spoiler summary = "Hint">↵
Just store the frequency in a pair then sort and print.↵
###### solution &mdash; http://paste.ubuntu.com/24717004/↵
</spoiler>↵

###### 2. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/caesars-cipher-1/↵

<spoiler summary="Hint">↵
Just direct Implementation↵
###### solution &mdash; http://paste.ubuntu.com/24717024/↵
</spoiler>↵

###### 3. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/marut-and-strings-4/↵

<spoiler summary="Hint">↵
The question was fun to try due to some unusual constraints.↵
###### solution &mdash; http://paste.ubuntu.com/24717043/↵
</spoiler>↵

###### 4. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/secret-messages/↵

<spoiler summary="Hint">↵
Direct implemetation↵
####### solution &mdash; http://paste.ubuntu.com/24717066/↵
</spoiler>↵

###### 5. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/remove-duplicates-3/↵

<spoiler summary="Hint">↵
Direct Implementation↵
###### solution &mdash; http://paste.ubuntu.com/24717079/↵
</spoiler>↵

###### 6. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/lexical-analyzer-3/↵

<spoiler summary = "Hint">↵
Make sure that the variables are not always space separated from = sign.↵
###### solution &mdash; http://paste.ubuntu.com/24717087/ ↵
</spoiler>↵

###### 7. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/ashish-and-binary-matrix-1/↵

<spoiler summary = "Hint">↵
This problem has wrong solution. Just check whether the string don't match.↵
###### solution &mdash; http://paste.ubuntu.com/24717093/↵
</spoiler>↵

###### 8. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/palindromes-3/↵

<spoiler summary = "Hint">↵
If the string don't match at a particular pair position, then one can add any number of possible and equal characters on either side.↵
###### solution &mdash; http://paste.ubuntu.com/24717104/↵
</spoiler>↵

###### 9. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/xenny-and-partially-sorted-strings-7/↵

<spoiler summary="Hint">↵
just store the first m characters and the index in a pair and then sort.↵
###### solution &mdash; http://paste.ubuntu.com/24717116/↵
</spoiler>↵

## 30 MAY 2017↵

###### 1. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/find-the-substrings/↵

<spoiler summary = "Hint">↵
The idea is to use two pointer and then keep updating the answer on the go.↵
###### solution &mdash; http://paste.ubuntu.com/24728003/↵
</spoiler>↵

###### 2. https://www.hackerearth.com/problem/algorithm/benny-and-her-school-reports/↵

<spoiler summary = "Hint">↵
Direct Implementation↵
###### solution &mdash; http://paste.ubuntu.com/24728021/↵
</spoiler>↵

###### 3. http://codeforces.com/problemset/problem/558/C↵

<spoiler summary="HInt">↵
The idea is to do the bfs over all values↵
###### solution &mdash; http://codeforces.com/contest/558/submission/27440146↵
</spoiler>↵

###### 4. http://codeforces.com/problemset/problem/558/D↵

<spoiler summary = "Hint">↵
The idea was to convert every level to leaf level and then sort and combine the range accordingly. Then check over all possible feasible combination.↵
###### solution &mdash; http://codeforces.com/contest/558/submission/27450439↵
</spoiler>↵

## 31 MAY 2017↵

###### 1. http://codeforces.com/problemset/problem/558/E↵

<spoiler summary = "Hint">↵
Just make 26 segment tree, one for each letter. And then use lazy update for sorting.↵
###### solution &mdash; http://codeforces.com/contest/558/submission/27458416↵
</spoiler>↵

###### 2. http://codeforces.com/problemset/problem/567/A↵

<spoiler summary = "Hint">↵
Direct implementation↵
###### solution &mdash; http://codeforces.com/contest/567/submission/27471653↵
</spoiler>↵

###### 3. http://codeforces.com/problemset/problem/567/B↵

<spoiler summary = "Hint">↵
Direct Implementation ↵
###### solution &mdash; http://codeforces.com/contest/567/submission/27471986↵
</spoiler>↵

###### 4. http://codeforces.com/problemset/problem/567/C↵

<spoiler summary = "Hint">↵
Basic dp problem↵
###### solution &mdash; http://codeforces.com/contest/567/submission/27472315↵
</spoiler>↵

## 1 JUNE 2017↵

Just gave the contest on codeforces↵

## 2 JUNE 2017↵

###### 1. http://codeforces.com/problemset/problem/577/C↵

<spoiler summary = "Hint">↵
Just find all prime powers and that will be enough.↵
###### solution &mdash; http://codeforces.com/contest/577/submission/27526007↵
</spoiler>↵

###### 2. http://codeforces.com/problemset/problem/577/B↵

<spoiler summary="Hint">↵
By pegion hole principle, Whenever n >= m, and is yes. Or you can do an exhaustive search using set.↵
###### solution &mdash; http://codeforces.com/contest/577/submission/27525462↵
</spoiler>↵

###### 3. http://codeforces.com/problemset/problem/577/A↵

<spoiler summary="Hint">↵
Just for all i check whether j is in range↵
###### solution &mdash; http://codeforces.com/contest/577/submission/27524959↵
</spoiler>↵

###### 4. http://codeforces.com/problemset/problem/567/E↵

<spoiler summary = "Hint">↵
Can be solved using bridge. Make a separate graph that contains only shortest path vertices, and make it undirected. now find all bridges. Since there can be multiple loops, instead of direct checking parent, check whether index matches or not.↵
###### solution &mdash; http://codeforces.com/contest/567/submission/27524686↵
</spoiler>↵

## 3 JUNE 2017↵

Doing Codechef Long Challange↵

## 4 JUNE 2017↵

###### 1. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/missing-alphabets-1/↵

<spoiler summary="Hint">↵
Direct Implementation↵
###### solution &mdash; http://paste.ubuntu.com/24791044/↵
</spoiler>↵

###### 2. https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/change-string/↵

<spoiler summary = "Hint">↵
Direct Implementation↵
###### solution &mdash; http://paste.ubuntu.com/24791048/↵
</spoiler>↵

## 5 JUNE 2017↵

Did codechef long and participated in education codeforces round↵

## 6 JUNE 2017↵

###### 1. http://codeforces.com/problemset/problem/570/A↵

<spoiler summary = "Hint">↵
Direct Implementation↵
###### solution &mdash; http://codeforces.com/contest/570/submission/27613674↵
</spoiler>↵

 ↵

###### 2. http://codeforces.com/problemset/problem/221/B↵

<spoiler summary = "Hint">↵
Direct Implementation↵
###### solution &mdash; http://codeforces.com/contest/221/submission/27613838↵
</spoiler>↵

###### 3. http://codeforces.com/problemset/problem/121/A↵

<spoiler summary = "Hint">↵
Just generate all numbers and then for every range, add the required number.↵
###### solution &mdash; http://codeforces.com/contest/121/submission/27614195↵
</spoiler>↵

## 7 JUNE 2017↵

Did contest on codeforces↵

## 8 JUNE 2017↵

###### 1. http://codeforces.com/problemset/problem/570/C↵

<spoiler summary = "Hint">↵
Create all possible range, then according to every query, update the ranges and ans accordingly.↵
###### solution &mdash; http://codeforces.com/contest/570/submission/27665459↵
</spoiler>↵

###### 2. http://codeforces.com/problemset/problem/456/D↵

<spoiler summary = "Hint">↵
Direct implementation of trie. Make loose and win accordingly and then decide for the answer.↵
###### solution &mdash; http://codeforces.com/contest/456/submission/27677006↵
</spoiler>↵

## 9 JUNE 2017↵

###### 1. http://codeforces.com/problemset/problem/13/E↵

<spoiler summary = "Hint">↵
Standard problem of square root decomposition. Just divide the array in block of size sqrt(n) and solve for each block. Then combine the ans for each query.↵
###### solution &mdash; http://codeforces.com/contest/13/submission/27678054↵
</spoiler>↵

###### 2. http://codeforces.com/problemset/problem/404/A↵

<spoiler summary = "Hint">↵
direct implementation↵
###### solution &mdash; http://codeforces.com/contest/404/submission/27686991↵
</spoiler>↵

## 10 JUNE 2017↵

Practised some simple problems on CF.↵

## 11 JUNE 2017↵

Solved MKTHNUM on spoj.↵

###### 1. http://codeforces.com/problemset/problem/579/C↵

<spoiler summary = "Hint">↵
Binary search over the max possible length, Then try to break that triangle in smaller part again using binary search↵
###### solution &mdash; http://codeforces.com/contest/579/submission/27710780↵
</spoiler>↵

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en23 English satylogin 2017-06-12 12:02:00 969
en22 English satylogin 2017-06-09 10:18:55 1307 Tiny change: 'n###### 1.http://cod' -> 'n###### 1. http://cod'
en21 English satylogin 2017-06-06 08:48:57 709
en20 English satylogin 2017-06-03 21:23:27 1185
en19 English satylogin 2017-06-02 21:04:12 949
en18 English satylogin 2017-05-31 19:36:34 1125
en17 English satylogin 2017-05-30 20:26:54 2883
en16 English satylogin 2017-05-29 16:59:46 1192
en15 English satylogin 2017-05-28 14:55:26 1801
en14 English satylogin 2017-05-27 08:30:54 7 Tiny change: 'r>\n\n## 25 MAY 2017\' -> 'r>\n\n## 26 MAY 2017\'
en13 English satylogin 2017-05-27 08:30:17 925
en12 English satylogin 2017-05-26 05:14:51 2081
en11 English satylogin 2017-05-25 07:31:25 131
en10 English satylogin 2017-05-24 08:48:14 2279 Tiny change: '>\n\n##### 5. h' -> '>\n\n###### 5. h'
en9 English satylogin 2017-05-23 07:48:10 298
en8 English satylogin 2017-05-22 08:26:38 3083
en7 English satylogin 2017-05-21 08:57:38 937
en6 English satylogin 2017-05-20 10:22:41 1031 Tiny change: 'eddc17Y\n<spoiler>' -> 'eddc17Y\n</spoiler>'
en5 English satylogin 2017-05-19 07:56:54 1865 Tiny change: 'ved - \n\n1. http://' -> 'ved - \n\n###### 1. http://'
en4 English satylogin 2017-05-18 04:50:02 1357
en3 English satylogin 2017-05-17 11:28:10 5 Tiny change: 'you about stopstalk.com. It is a ' -> 'you about **stopstalk.com** . It is a '
en2 English satylogin 2017-05-17 10:51:46 0 (published)
en1 English satylogin 2017-05-17 10:51:06 2862 Initial revision (saved to drafts)