Skip to content

Б12-513 Кострюкова Виктория #32

Open
vika090 wants to merge 3 commits intoDafeCpp:mainfrom
vika090:main
Open

Б12-513 Кострюкова Виктория #32
vika090 wants to merge 3 commits intoDafeCpp:mainfrom
vika090:main

Conversation

@vika090
Copy link
Copy Markdown

@vika090 vika090 commented Mar 20, 2026

No description provided.

Comment thread task_01/src/task1.cpp
#include <utility>
#include <vector>

using namespace std;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

не приветствую использование using namespace std

Comment thread task_01/src/task1.cpp

using namespace std;

pair<int, int> func(const vector<int>& arr, int Summa) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

плохое название функции, непонятно что она делает( и второй параметр не по кодстайлу, параметры как и переменные с маленькой_буквы_с_подчеркиванием_если_несколько_слов, и транслит не нужно использовать, просто sum

Comment thread task_01/src/test.cpp
TEST(Task1Test, NegativeNumbers) {
vector<int> arr = {-5, -3, 0, 2, 4};
int S = -1;
pair<int, int> result = func(arr, S);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

можно не исправлять, но если что-то не меняется то лучше сделать константой

Comment thread task_06/src/test.cpp

using namespace std;

TEST(TopologySort, Simple) { ASSERT_EQ(1, 1); }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

удали)

Comment thread task_06/src/task6.cpp

using namespace std;

int func(int N, int K, const vector<int>& arr) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

тут сложность O(N*K), можно просто за O(N)

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