Skip to content

Until 25.09#1

Open
Andrew-Kochanov wants to merge 15 commits intomainfrom
until_25.09
Open

Until 25.09#1
Andrew-Kochanov wants to merge 15 commits intomainfrom
until_25.09

Conversation

@Andrew-Kochanov
Copy link
Owner

Дз до 25.09

Copy link
Collaborator

@WoWaster WoWaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. У Вас у ВСЕХ файлов отсутствует расширение. Так не надо.
  2. Форматтер НАДО настроить.
  3. Будьте внимательнее!

lucky_tick Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь у Вас задача про переворот массива, а не про счасливые билетики

rearran_segm Outdated
int* list = (int *)malloc(lenght * sizeof(int));
for (int i = 1; i < m + n + 1; i++)
{
int i_1 = i - 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мы используем camelCase, а не snake_case

rearran_segm Outdated
list[i] = temp;
}

//сортирока пузырьком длиннейшего из отрезков, т.к. его переставляли не целиком
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А кто сказал, что массив отсортирован? Тут сортировка явно лишняя

incom_priv Outdated
Comment on lines 16 to 17
while (a > b)
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И форматтер у Вас не настроен

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В данном случае комментарии в коде излишни, но ок. Зачтено.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А что будет, если b = 0?

lucky_tick.c Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Условие требует комбинаторного решения.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не оптимально, но корректно. Зачтено.

incom_priv.c Outdated
incomp *= -1;
}

// вычитаем из a число b до тех пор пока b не станет больше а. И прибавляем к счетчику 1.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Или -1 прибавляем?)

Copy link
Collaborator

@WoWaster WoWaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну кааак... Отформатируйте код и будет счастье.

WoWaster
WoWaster previously approved these changes Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants