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.me/problemset/problem/535/D↵
This was a simple problem and it used Z function for prefix length calculation↵
###### **solution link** — http://codeforces.me/contest/535/submission/27152004↵
↵
###### 2. http://codeforces.me/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.me/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.me/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** — http://codeforces.me/contest/552/submission/27165795↵
↵
###### B. http://codeforces.me/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** — http://codeforces.me/contest/552/submission/27165912↵
↵
###### C. http://codeforces.me/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** — http://codeforces.me/contest/552/submission/27166275↵
↵
###### D. http://codeforces.me/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** — http://codeforces.me/contest/552/submission/27166893↵
↵
###### E. http://codeforces.me/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** — http://codeforces.me/contest/552/submission/27167519 ↵
↵
↵
## 17 MAY 2017↵
↵
Solved very few problems. Found a lot of problems hard to solve.↵
↵
##### Problems Solved - ↵
↵
###### 1. http://codeforces.me/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 — http://codeforces.me/contest/551/submission/27175198↵
↵
###### 2. http://codeforces.me/problemset/problem/549/A↵
Fairly easy problem. Requires direct implementation↵
###### solution link — http://codeforces.me/contest/549/submission/27181042↵
↵
###### 3. http://codeforces.me/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 — http://codeforces.me/contest/534/submission/27184116↵
↵
##### Problems Unsolved - ↵
↵
###### 1. http://codeforces.me/problemset/problem/534/F↵
###### 2. http://codeforces.me/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 — ↵
↵
###### 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 — https://code.hackerearth.com/a4c9b2Y ↵
↵
Then some problems on codeforces <br>↵
↵
###### 1. http://codeforces.me/problemset/problem/549/H↵
Finally solved the matrix problem. Used binary search for reducing the size of squares.↵
###### solution link — http://codeforces.me/contest/549/submission/27189164↵
↵
###### 2. http://codeforces.me/problemset/problem/519/A↵
Direct implementation↵
###### solution link — http://codeforces.me/contest/519/submission/27193319↵
↵
###### 3. http://codeforces.me/problemset/problem/519/B↵
Direct implementation↵
###### solution link — http://codeforces.me/contest/519/submission/27201264↵
↵
###### 4. http://codeforces.me/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 — http://codeforces.me/contest/519/submission/27201384↵
↵
###### 5. http://codeforces.me/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 — http://codeforces.me/contest/519/submission/27202224↵
↵
##### Problems unsolved - ↵
↵
###### 1. http://codeforces.me/problemset/problem/519/E↵
↵
## 19 MAY 2017↵
↵
I only participated in a virtual contest on URI. Few of the good problems were — ↵
↵
###### 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 — 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 — 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 — 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 — https://code.hackerearth.com/3332f9b↵
</spoiler>↵
↵
↵
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.me/problemset/problem/535/D↵
This was a simple problem and it used Z function for prefix length calculation↵
###### **solution link** — http://codeforces.me/contest/535/submission/27152004↵
↵
###### 2. http://codeforces.me/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.me/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.me/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** — http://codeforces.me/contest/552/submission/27165795↵
↵
###### B. http://codeforces.me/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** — http://codeforces.me/contest/552/submission/27165912↵
↵
###### C. http://codeforces.me/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** — http://codeforces.me/contest/552/submission/27166275↵
↵
###### D. http://codeforces.me/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** — http://codeforces.me/contest/552/submission/27166893↵
↵
###### E. http://codeforces.me/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** — http://codeforces.me/contest/552/submission/27167519 ↵
↵
↵
## 17 MAY 2017↵
↵
Solved very few problems. Found a lot of problems hard to solve.↵
↵
##### Problems Solved - ↵
↵
###### 1. http://codeforces.me/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 — http://codeforces.me/contest/551/submission/27175198↵
↵
###### 2. http://codeforces.me/problemset/problem/549/A↵
Fairly easy problem. Requires direct implementation↵
###### solution link — http://codeforces.me/contest/549/submission/27181042↵
↵
###### 3. http://codeforces.me/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 — http://codeforces.me/contest/534/submission/27184116↵
↵
##### Problems Unsolved - ↵
↵
###### 1. http://codeforces.me/problemset/problem/534/F↵
###### 2. http://codeforces.me/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 — ↵
↵
###### 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 — https://code.hackerearth.com/a4c9b2Y ↵
↵
Then some problems on codeforces <br>↵
↵
###### 1. http://codeforces.me/problemset/problem/549/H↵
Finally solved the matrix problem. Used binary search for reducing the size of squares.↵
###### solution link — http://codeforces.me/contest/549/submission/27189164↵
↵
###### 2. http://codeforces.me/problemset/problem/519/A↵
Direct implementation↵
###### solution link — http://codeforces.me/contest/519/submission/27193319↵
↵
###### 3. http://codeforces.me/problemset/problem/519/B↵
Direct implementation↵
###### solution link — http://codeforces.me/contest/519/submission/27201264↵
↵
###### 4. http://codeforces.me/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 — http://codeforces.me/contest/519/submission/27201384↵
↵
###### 5. http://codeforces.me/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 — http://codeforces.me/contest/519/submission/27202224↵
↵
##### Problems unsolved - ↵
↵
###### 1. http://codeforces.me/problemset/problem/519/E↵
↵
## 19 MAY 2017↵
↵
I only participated in a virtual contest on URI. Few of the good problems were — ↵
↵
###### 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 — 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 — 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 — 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 — https://code.hackerearth.com/3332f9b↵
</spoiler>↵
↵