Блог пользователя Frez

Автор Frez, история, 6 лет назад, По-английски

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'.)

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Frez, история, 9 лет назад, По-английски

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 ?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +40
  • Проголосовать: не нравится

Автор Frez, история, 9 лет назад, По-английски

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 ?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

Автор Frez, 9 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

Автор Frez, история, 9 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

Автор Frez, история, 9 лет назад, По-английски

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 )

Полный текст и комментарии »

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится