Harolinch's blog

By Harolinch, history, 3 years ago, In English

Dear codeforces community, I came across this problem F: Strange Array and I am not able to solve it and not also able to understand the tutorial. can anyone please help me to solve it ? what is the idea behind it and how to approach the problem

Full text and comments »

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

By Harolinch, history, 3 years ago, In English

Recently I was trying to solve a problem and I keep getting Memory Limit. here is my solution. Help me figure out why I am getting Memory Limit.

Full text and comments »

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

By Harolinch, history, 5 years ago, In English

Hello Codeforces Community,

I'm a JS developer and hope every js developer in community supports me.

MikeMirzayanov, there is a package named "tstl" = typescript template library, it's open source library which implements c++/stl.

the link to the package

i hope you add it to to the judge and allow us to require the package in submission file

Full text and comments »

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

By Harolinch, 6 years 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 ?

Full text and comments »

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

By Harolinch, 6 years 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 ?

Full text and comments »

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

By Harolinch, 6 years 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 ...?!

Full text and comments »

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

By Harolinch, history, 6 years ago, In English

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

Full text and comments »

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

By Harolinch, history, 6 years ago, In English

how to access tju online judge ?

Full text and comments »

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

By Harolinch, history, 6 years 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);
}

Full text and comments »

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

By Harolinch, history, 6 years 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

Full text and comments »

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

By Harolinch, history, 6 years 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)

Full text and comments »

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

By Harolinch, history, 6 years 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 ?

Full text and comments »

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

By Harolinch, history, 6 years ago, In English

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

Full text and comments »

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