Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

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

Автор msnp1381, история, 2 года назад, По-английски

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

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

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

Автор msnp1381, 3 года назад, По-английски

1607E - Robot on the Board 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;

}

~~~~~

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

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

Автор msnp1381, история, 3 года назад, По-английски

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

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

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