Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя IF-THEN

Автор IF-THEN, история, 12 дней назад, По-английски

I would like to thank everyone who contributed to the creation and operation of this amazing website. But I couldn't find any way to use dark theme here. So I am curious to learn how can I do this ? and why isn't there a button somewhere to do that?

This massive amount of light from the screen is absolutely devastating to my mood and focus. Any one has the same issue? Any way to change it to dark mode?

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

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

Автор IF-THEN, история, 4 года назад, По-английски

What doe the following code mean ? Why use it ?

#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);
#endif

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

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

Автор IF-THEN, история, 5 лет назад, По-английски
bool dfs(int r, int c) {
    if (r > n || c > m || vis[ndx(r, c)] || grid[ndx(r,c)] == '#') return false;
    if (r == n && c == m) return true;
    if (r!=1 || c!=1) vis[ndx(r, c)] = true;
    return dfs(r+1, c) || dfs(r, c+1);
}

Why Does the previous code terminate once a call is evaluated as true ?

In other words, Why it doesn't mark each reachable cell that does not have "#", as expected ?

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

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

Автор IF-THEN, история, 5 лет назад, По-английски

How can I find all Div 3 contests ?

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

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

Автор IF-THEN, история, 5 лет назад, По-английски

When I choose Clang++17 Diagnostics and submit this solution, The verdict is TLE. But

when I choose any GNU G++ and submit the exact same code, It's Accepted.

why ?

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

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