Does anyone know the name of the font that is used to display source code here on cf?
Thanks in advance.
I submitted the following solution for today's B during the contest: http://codeforces.com/contest/1005/submission/40123027 But even later when i saw the test case, i couldn´t figure out what i did wrong, cause i think my logic is correct. Can someone explain why is my algorithm failing? Are there any corner cases in this problem?
Thanks in advance, have a great day.
I remapped the keybindings in Sublime Text 3 so that ctrl+v pastes the text and also indents it correctly, but i've tested it with codeforces and my code continues the same as before (when i didn't use paste and indent) : with a huge tab size. Although it´s not a huge problem, i'd like to see it fixed because it´s bugging me a little bit. So, if someone has experienced something similar before or has a clue of what might be causing this problem, please share it in the comments.
Thanks in advance.
I´m having a hard time implementing the swap function for a wavelet tree, which would be:
Given an index i, swap the elements at positions i and i + 1.
Can anyone point any references that would help?
So here´s the problem:
Given two sequences of numbers s and r, such that all elements from the sequences are distinct, find the longest common subsequence of both sequences.
Now, i know the DP solution for the general case, which is executed in O(n2), but in this problem i need to get as efficient as O(nlg(n)). I found an explanation on stack overflow about how to use the LIS (Longest Increasing Subsequence) algorithm to achieve this complexity, but i didn´t understand very well. So does anyone how to explain a faster than quadratic algorithm to solve this problem?
Consider the following problem:
Given an initial array of n integers, you´re asked to perform q queries of the form:
I x V : Add V to the x-th position on the array. If it is not empty (equals 0) then add it between the positions x and x + 1.
S x y : Calculate the sum of all elements from index x to y, inclusively.
My teacher has advised us to use RMQ or an Offline Segment Tree for this one, but i would like to know if there´s a way of adapting the Fenwick Tree to support this sort of shift that may need to be done on the vector efficiently.
So after today´s contests i tried to solve problem B (yeah, i didn´t do that great hehe), and then submmited a solution that amazingly got WA only in test number 95, here it is:
I don´t necesserily think i broke a record, but i figured it would be fun to see if you guys can also share on the comments some possibly record breaking submissions like: most test cases passed before TLE, most test cases passed before WA and stuff like that. Maybe even tell more about the code involved in each of those submissions and why things went wrong.
Does anyone know an algorithm to solve the following problem:
Given a sequence of points in the plane that represent a polygon (not necessarily convex), output the maximum possible radius of a circle that can fit inside this polygon.
It would be good if it was below O(n2), but any references are welcome. Thanks ahead.
I have an idea for a very neat problem envolving trees and mathematics. Althought it´s not trivial, math-minded folks will likely solve it in no more than a few minutes. So i´d like to know where can i propose only this problem, so that it is avaible to be used in future contests if it interests anyone.