msnp1381's blog

By msnp1381, history, 3 years ago, In English

I recently started cp and I'm confused about the road map and Ican figureout how to solve problems. Ikonw basics but I can't solve any questions and I have no refrence to read or learn and these things bothers me

Full text and comments »

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

By msnp1381, 3 years ago, In English

1607E - Робот на доске 1

acording to tutorial and answer src why u should claulate max-min while you can calulate max <= n(or m) and min >= -n(or -m)

my code: ~~~~~ while (true) { scanf("%c", &c); if (c == 'R'){ r++; x--; } if (c == 'L'){ l++; x++; } if (c == 'U'){ u++; y--;} if (c == 'D'){ d++;y++;} if (c == '\n') break; Mx=max(Mx,x); My=max(My,y); my=min(my,y); mx=min(mx,x); if(Mx>=n||mx<=-n ||My>=m||my<=-m)break;

}

~~~~~

Full text and comments »

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

By msnp1381, history, 3 years ago, In English

Hi I'm using macOS therefor I'm using clang instead of gcc and until now i had no problem with that but my codes in codeforces it shows memory limit exceed and i tried aging with c++14 and it did accept now I'm confused which compiler is best and what's their difference? My submissions s1 and s2

Full text and comments »

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