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

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

Hello guys,so Im a newbie here and i'm currently trying to solve A and B problems of the recent contests faster.Yes,I'm practicing,but do I have to learn algorithms at this stage?Or should I just keep solving problems.And if i should learn algorithms then from where do I begin?

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

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

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

I get a lot of tips that i should see top coders/programmers code just to get some new information.Indeed,I get a lot of new information but I dont understand some specific part of their code,like how's that working.Is there any way to know that? As an example,look at this code:

int n;
cin>>n;
string s;
cin>>s;
int count[26]{0};
for(int i=0;i<n;i++)
  count[s[i]-'a']=1; //here i dont get the logic behind this part.I know what its doing.But i dont know how it is doing it.

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

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