Harolinch's blog

By Harolinch, 4 months ago, In English,

hello all, i'm trying to submit problems in Javascript, some submissions on codeforces use methods readline() and write() for std in/out which i can't find any reference or docs about it.

i'm using Vscode with node installed on windows.

how to write js code and debug it with std in/out on my environment with both mentioned above methods ?

Read more »

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

By Harolinch, 5 months ago, In English,

I need your help given string A, B. How to find longest subsequence of A that doesn't include B as substring ?

Read more »

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

By Harolinch, 6 months ago, In English,

Dear MikeMirzayanov,

I wish Codeforces has "notes" icon within each problem to allow me write my own private notes for the problem.

I wish Codeforces allows me to have a custom tags, and tag any problem with my own specific tags and allow me to search for a problem by my tags.

for other competitors, what do you wish ...?!

Read more »

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

By Harolinch, history, 9 months ago, In English,

this problem killed me... can anyone help me with it ?

Read more »

 
 
 
 
  • Vote: I like it
  • -1
  • Vote: I do not like it

By Harolinch, history, 10 months ago, In English,

how to access tju online judge ?

Read more »

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

By Harolinch, history, 10 months ago, In English,

having a point p1(x0, y0) and want to find the projection of p1 on the line L given in form ax + by + c = 0

let the projection point is p2(x1, y1), so how to find x1 and y1 ?

i have a code segment which do so but i don't understand it, so can someone help me to understand it ?

the code is

point closest_point (line l, point p)
{
    double k = (l.a * p.x + l.b * p.y + l.c) / (l.a * l.a + l.b * l.b);
    return point (p.x - l.a * k, p.y - l.b * k);
}

Read more »

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

By Harolinch, history, 11 months ago, In English,

i used to use visual studio in debugging, but now i switched to linux and of course i need to learn to debug with gdb, may someone share his experience with me

Read more »

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

By Harolinch, history, 11 months ago, In English,

i'm try to solve this graph problem (double profiles) and it requires to use hashes in order to solve the problem.

first of all, i didn't solve the problem and and if anyone could give me help, i appreciate that.

secondly, when should i know that i need to use hashes to solve a graph problem (what is the properties of the graph problems that need hashes)

Read more »

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

By Harolinch, history, 11 months ago, In English,

i'm trying to solve a dp problem involves bitmasks and when i see others code, all of them have the these lines

for(mask = 0; mask < (1 << k); mask++){
    ..
    for(submask = (mask - 1) & mask; submask > 0; submask = (submask - 1) & mask){
        ..
    }

what these lines means ?

Read more »

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

By Harolinch, history, 11 months ago, In English,

can anyone help me to solve this problem http://codeforces.com/contest/152/problem/E (Garden), i read the editorial but i didn't understand it, may any one clarify it more

Read more »

 
 
 
 
  • Vote: I like it
  • -2
  • Vote: I do not like it