## GREEDY MOVES DAY 02 – Q5

C. Adding Powers Problem Statement - https://codeforces.com/problemset/problem/1312/C We will use bitmasking to solve this question. Let's convert this number in k-system. Clearly, every element of a needs to be summation…

Continue Reading GREEDY MOVES DAY 02 – Q5

## GREEDY MOVES DAY 02 – Q4

B. Count Subrectangles Problem Statement - https://codeforces.com/problemset/problem/1323/B Given n,m,k we can actually find out the frequency of consecutive ones in each row,column. So, for example we have a row as…

Continue Reading GREEDY MOVES DAY 02 – Q4

## GREEDY MOVES DAY 02 – Q3

A. Unusual Competitions Problem Statement - https://codeforces.com/problemset/problem/1322/A The greedy choice here is to correct the sequence by reordering it as soon as you get the count of closing brackets equal…

Continue Reading GREEDY MOVES DAY 02 – Q3

## GREEDY MOVES DAY 02 – Q2

C. Permutation Partitions Problem Statement - https://codeforces.com/problemset/problem/1326/C Again, this problem was straight-forward implementation based. The greedy choice here is that we need to consider the last k integers to form…

Continue Reading GREEDY MOVES DAY 02 – Q2

## GREEDY MOVES DAY 02 – Q1

D2. Prefix-Suffix Palindrome (Hard version) Problem Statement - https://codeforces.com/problemset/problem/1326/D2 The problem was quite straight-forward application of KMP Algorithm. The first thing , we can easily check out for those characters…

Continue Reading GREEDY MOVES DAY 02 – Q1

## GREEDY MOVES DAY 01 – Q6

A. Powered Addition Problem Statement - https://codeforces.com/problemset/problem/1338/A This is a bit easy problem, at each step, if the current element is less than the maximum till now, we need to…

Continue Reading GREEDY MOVES DAY 01 – Q6

## GREEDY MOVES DAY 01 – Q4

Phoenix and Distribution Problem Statement - https://codeforces.com/problemset/problem/1348/C This became time consuming for me because I misinterpreted the problem statement. Not confusing you with what I thought!, the problem asks you…

Continue Reading GREEDY MOVES DAY 01 – Q4

## GREEDY MOVES DAY 01 – Q3

C. Circle of Monsters Problem Statement - https://codeforces.com/problemset/problem/1334/C In this problem, we are said to find minimum bullets needed to kill all the monsters. But, looking closely, we understand that…

Continue Reading GREEDY MOVES DAY 01 – Q3

## GREEDY MOVES DAY 01 – Q2

Minimum Euler Cycle Problem - https://codeforces.com/problemset/problem/1334/D To start with, if you don't know about complete graphs, check this out https://en.wikipedia.org/wiki/Complete_graph So, we have a complete graph, where each edge needs…

Continue Reading GREEDY MOVES DAY 01 – Q2

## GREEDY MOVES DAY 01 – Q1

B. Phoenix and Beauty Question - https://codeforces.com/problemset/problem/1348/B The problem ask you to construct the solution where each subarray of size 'k' must have same sum. We DO NOT need to…

Continue Reading GREEDY MOVES DAY 01 – Q1