Binlogs
https://atcoder.jp/contests/abc413
was able to solve 4 during contest and finished the 3 that were left after the contest.
Binlogs
https://codeforces.com/contests/2119
I was only able to solve 2 during contest. didn't try it after the contest.
the issue was question B, which I tried but couldn't solve.
the issue was question B, which I tried but couldn't solve.
Binlogs
https://codeforces.com/contests/2124
I solved 4 during the contest. which is good considering the previous one.
Binlogs
https://atcoder.jp/contests/abc414
A.
check if the current range encapsulates the initial range, and if it does increment the count.
B.
check if the current length of the string plus that is going to be added is greater than 100 or not, if it is stop there and output "Too Long", else put the new characters in to the answer string.
C.
(I couldn't solve it during the contest, one issue was that the code I run on my machine says TLE, but I know that it shouldn't say that, despite knowing that I was trying to come up with a new solution that doesn't say TLE. And It turns out it passes on the site)
Generate all the palindromes up to the given number, then for each number check if it is also a palindrome in the given base, if it is add it to the current sum. finally output the answer.
D.
Sort the list first. we want to add a signal strength such that the total sum of signal strengths is as small as possible. To solve this, we can utilize the gap that exists between the numbers. So if the gap is larger, it is a sign that we should divide the array into two on that point, therefore allowing us to minimize what we have to add. There is an "m" that is given which can be understood as the number of maximum gaps, we have to discard; if we do that the only values that are left are all the minimums and we can just add them and output the result.
E.
Time was not enough. Didn't even read it properly.
#contest_analysis
check if the current range encapsulates the initial range, and if it does increment the count.
B.
check if the current length of the string plus that is going to be added is greater than 100 or not, if it is stop there and output "Too Long", else put the new characters in to the answer string.
C.
(I couldn't solve it during the contest, one issue was that the code I run on my machine says TLE, but I know that it shouldn't say that, despite knowing that I was trying to come up with a new solution that doesn't say TLE. And It turns out it passes on the site)
Generate all the palindromes up to the given number, then for each number check if it is also a palindrome in the given base, if it is add it to the current sum. finally output the answer.
D.
Sort the list first. we want to add a signal strength such that the total sum of signal strengths is as small as possible. To solve this, we can utilize the gap that exists between the numbers. So if the gap is larger, it is a sign that we should divide the array into two on that point, therefore allowing us to minimize what we have to add. There is an "m" that is given which can be understood as the number of maximum gaps, we have to discard; if we do that the only values that are left are all the minimums and we can just add them and output the result.
E.
Time was not enough. Didn't even read it properly.
#contest_analysis
👍1
Binlogs
https://codeforces.com/contests/2125
A.
the question wants to order the string such that "FFT" or "NTT", don't appear as a substring in the string.
approach: take 'F' and 'N' characters to the end of the string.
B.
we're given a, b, and k.
since it only costs us once, when we use a pair of numbers. we can try to find the optimal numbers such that we just have to choose once.
we can get those values by just dividing a and b by their gcd.
then if max(the values we found) is less than or equal to k. we can reach (0, 0) by the cost of 1. else it will take 2.
C.
good integers: integers whose prime factorization only contains numbers that are at least 2 digits.
we are asked to find the number of good integers between
approach: we can substract the integers that are not good from the total numbers until a particular number.
if we found those numbers for
How can find the integers that are not good?
since prime factors that are not at least two digits are: 2, 3, 5, 7
we can just find numbers that are divisible by them.
To do that we can use,
and that's it.
D.
I read it, but I couldn't understand how the output for the sample testcases were reached.
E.
Understood it, but couldn't come up with an approach.
#contest_analysis
the question wants to order the string such that "FFT" or "NTT", don't appear as a substring in the string.
approach: take 'F' and 'N' characters to the end of the string.
B.
we're given a, b, and k.
since it only costs us once, when we use a pair of numbers. we can try to find the optimal numbers such that we just have to choose once.
we can get those values by just dividing a and b by their gcd.
then if max(the values we found) is less than or equal to k. we can reach (0, 0) by the cost of 1. else it will take 2.
C.
good integers: integers whose prime factorization only contains numbers that are at least 2 digits.
we are asked to find the number of good integers between
l and r.approach: we can substract the integers that are not good from the total numbers until a particular number.
if we found those numbers for
r it means that we found all upto that point. to get the numbers between l and r, we can just substract ("the r one we found from l-1, (because we want the answer that includes l), numbers) and that will be the answer.How can find the integers that are not good?
since prime factors that are not at least two digits are: 2, 3, 5, 7
we can just find numbers that are divisible by them.
To do that we can use,
The inclusion-exclusion principle from mathematicsand that's it.
D.
I read it, but I couldn't understand how the output for the sample testcases were reached.
E.
Understood it, but couldn't come up with an approach.
#contest_analysis
Binlogs
https://atcoder.jp/contests/abc416
A.
manually check if every character that exists between
B.
Essentially what the question is asking us to do is to put only one
C.
I tried to find a greedy solution for this in which I can just what the sentence is at the
What most people did was generate all the sentences possible, then sort them then pick the
#contest_analysis
manually check if every character that exists between
L and R is o.B.
Essentially what the question is asking us to do is to put only one
o character between # characters.C.
I tried to find a greedy solution for this in which I can just what the sentence is at the
x place, which unfortunately failed because of reasons unknown to me.What most people did was generate all the sentences possible, then sort them then pick the
x place.#contest_analysis
Binlogs
https://codeforces.com/contests/2128?locale=en
A.
we are trying to find the optimal way in which we can choose some numbers in some state so that the total cost would be minimum.
Since after an element is chosen, the other ones are doubled. we can see that if in the current state an element is greater than our
Now let's reverse sort our numbers array, then iterate through it,
while traversing if the current value is greater than our
But what if the current value is less than or equal to our
B.
The question wants us to build a new array by either popping an element on the left from the original array or popping an element on the right from the original array, such that the new array we built does not have a 5 sized sub-array which is monotonically increasing or decreasing.
To do that what we can do is build an increasing array until the current increasing order is not 5, by taking the larger element between the left and right of the original array. Now when we reach to a case where the order 4 that means we have to take a lesser number right? thus we just have to choose the minimum between the left and right of the original array. WHY DOES THIS WORK? because we came up until this moment by taking the maximum, therefore the current minimum will always be less than or equal to the previous value we took.
C.
The statement:
given a new array, they want us to find if it is possible to build this array.
The hardest part of this question was to find the likelihood of attaining the current element by using the previous elements as an input.
by analyzing and staring at the computer screen for a while, we can find out that if the current element is greater than (minimum(previous elements) * 2 - 1), then it will be impossible to attain this value else it is always possible.
Now just print "NO" if there is a case that the previous formula fails else print "YES".
D.
I understood it, but I only could come up to a half solution, I was trying to find the other half until time run out.
may be if I started from this question instead of
and that's it.
#contest_analysis
we are trying to find the optimal way in which we can choose some numbers in some state so that the total cost would be minimum.
Since after an element is chosen, the other ones are doubled. we can see that if in the current state an element is greater than our
c, it will always be greater than our c.Now let's reverse sort our numbers array, then iterate through it,
while traversing if the current value is greater than our
c, then we will add to our cost, but we will not double the other numbers because if it costs us now, that means it will always cost us. thus if we were doing a manual thing we can just choose it at the last right? But what if the current value is less than or equal to our
c, then we can double the rest of the elements because we got a chance to save us some cost on this case. And the rest of the elements after this are all smaller elements so that the likelihood that among the doubled numbers we find an element that is less than or equal to our c is highly likely.B.
The question wants us to build a new array by either popping an element on the left from the original array or popping an element on the right from the original array, such that the new array we built does not have a 5 sized sub-array which is monotonically increasing or decreasing.
To do that what we can do is build an increasing array until the current increasing order is not 5, by taking the larger element between the left and right of the original array. Now when we reach to a case where the order 4 that means we have to take a lesser number right? thus we just have to choose the minimum between the left and right of the original array. WHY DOES THIS WORK? because we came up until this moment by taking the maximum, therefore the current minimum will always be less than or equal to the previous value we took.
C.
The statement:
Consider an array a1,…,an
. Initially, ai=0
for every i
.
You can do operations of the following form.
You choose an integer x
greater than min(a)
.
Then, i
is defined as the minimum index such that ai<x
. In other words, i
is the unique integer between 1
and n
inclusive such that ai<x
and aj≥x
for every 1≤j≤i−1
.
Finally, ai
is incremented by x
.
given a new array, they want us to find if it is possible to build this array.
The hardest part of this question was to find the likelihood of attaining the current element by using the previous elements as an input.
by analyzing and staring at the computer screen for a while, we can find out that if the current element is greater than (minimum(previous elements) * 2 - 1), then it will be impossible to attain this value else it is always possible.
Now just print "NO" if there is a case that the previous formula fails else print "YES".
D.
I understood it, but I only could come up to a half solution, I was trying to find the other half until time run out.
may be if I started from this question instead of
A, I might have been able to solve it.and that's it.
#contest_analysis
🔥1