Frez's blog

By Frez, history, 6 years ago, In English

Do you have any idea about How we can make a code that generates random solid grid graph examples?

Definition of solid grid graph (from:http://www.graphclasses.org/classes/gc_1058.html): A graph is a solid grid graph iff it is a grid graph that can be embedded in the plane such that the vertices lie on integer coordinates, the edges have unit length and all interior faces have unit area. (The first two conditions hold for every grid graph, the third says that the embedding contains no `holes'.)

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Frez, history, 8 years ago, In English

What's the best algorithms for these below problems?

  • Subarray with Max Xor ?

  • Subsequence with Max Xor ?

  • Longest Subarray among those have Max Xor ?

  • Longest Subsequence among those have Max Xor ?

  • Can we use each algorithm for Min Xor , too ?

  • Longest Common Substring between two strings ?

Full text and comments »

  • Vote: I like it
  • +40
  • Vote: I do not like it

By Frez, history, 9 years ago, In English

How scores for submissions calculate after contest in topcoder?

When I submit a solution for problems for practice , it gave me 179 , 109 , 75 ,... for 250 score problem! How can i know it is full accepted or not ?

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it

By Frez, 9 years ago, In English

We have an array with size N from integers.

what is the best complexity of finding max sum of subarrays with size 1,2,3..,N ?

for example :

a = 1 4 4 2 5

s1 = 5

s2 = 8

s3 = 11

s4 = 15

s5 = 16

  • How about max/min single number or such interesting things ?

thanks.

Full text and comments »

  • Vote: I like it
  • +8
  • Vote: I do not like it

By Frez, history, 9 years ago, In English

Suppose we have n set of numbers . we want to choose a number from each set that they were distinct . how we can do it efficiently ?

A -> 1 <= n <= 20 , 1 <= |s| <= 100 , 1 <= numbers <= 10^9

B -> 1 <= n <= 10^5 , 1 <= |s| <= 10^5 , 1 <= numbers <= 10^9

C -> In General ?

thanks in advance.

Full text and comments »

  • Vote: I like it
  • +8
  • Vote: I do not like it

By Frez, history, 9 years ago, In English

Hi.

I'm very interested in binary representation of numbers.I see some attractive formula and methods such as :

  • (x)&(-x) return smallest significant of x that is 1 !

  • use binary for create all subsets of a small set :)

  • ...

I want to learn more, so create this blog for sharing interest knowledges and making it worth post for competitive programmers. also I want to know is there a relation about remainder of numbers or divisibility of them in binary ? ( for example in decimal we know a number is divisible by 5 when it's last digit is 0 or 5 )

Full text and comments »

  • Vote: I like it
  • +6
  • Vote: I do not like it