forked from AlgorithmsDafeMipt2024/spring_homework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from AlgorithmsDafeMipt2024/main
1
- Loading branch information
Showing
22 changed files
with
292 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Задача 1 | ||
|
||
Дано целое число и массив целых чисел, нужно найти 2 числа из массива которые в сумме дадут заданное число | ||
Дано целое число и отсортированый массив целых чисел, нужно найти 2 числа из массива которые в сумме дадут заданное число |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME) | ||
string(REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME}) | ||
project(${PROJECT_NAME} C CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
file(GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp") | ||
file(GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp") | ||
file(GLOB_RECURSE main_source_list "src/main.cpp") | ||
file(GLOB_RECURSE test_source_list "src/*.cpp") | ||
file(GLOB_RECURSE test_list "src/*test.cpp") | ||
|
||
list(REMOVE_ITEM test_source_list ${main_source_list}) | ||
list(REMOVE_ITEM source_list ${test_list}) | ||
|
||
include_directories(${PROJECT_NAME} PUBLIC src) | ||
include_directories(${PROJECT_NAME} PUBLIC ../lib/src) | ||
|
||
add_executable(${PROJECT_NAME} ${source_list}) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC Utils) | ||
|
||
# Locate GTest | ||
enable_testing() | ||
find_package(GTest REQUIRED) | ||
include_directories(${GTEST_INCLUDE_DIRS}) | ||
|
||
# Link runTests with what we want to test and the GTest and pthread library | ||
add_executable(${PROJECT_NAME}_tests ${test_source_list}) | ||
target_link_libraries( | ||
${PROJECT_NAME}_tests | ||
GTest::gtest_main | ||
Utils | ||
) | ||
|
||
include(GoogleTest) | ||
gtest_discover_tests(${PROJECT_NAME}_tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Задача на кучу | ||
|
||
В данной задаче необходимо реализовать [кучу](https://ru.wikipedia.org/wiki/%D0%94%D0%B2%D0%BE%D0%B8%D1%87%D0%BD%D0%B0%D1%8F_%D0%BA%D1%83%D1%87%D0%B0), можно пользоваться std::vector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include <iostream> | ||
|
||
int main() { return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
#include <gtest/gtest.h> | ||
|
||
TEST(TopologySort, Simple) { | ||
ASSERT_EQ(1, 1); // Stack [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME) | ||
string(REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME}) | ||
project(${PROJECT_NAME} C CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
file(GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp") | ||
file(GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp") | ||
file(GLOB_RECURSE main_source_list "src/main.cpp") | ||
file(GLOB_RECURSE test_source_list "src/*.cpp") | ||
file(GLOB_RECURSE test_list "src/*test.cpp") | ||
|
||
list(REMOVE_ITEM test_source_list ${main_source_list}) | ||
list(REMOVE_ITEM source_list ${test_list}) | ||
|
||
include_directories(${PROJECT_NAME} PUBLIC src) | ||
include_directories(${PROJECT_NAME} PUBLIC ../lib/src) | ||
|
||
add_executable(${PROJECT_NAME} ${source_list}) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC Utils) | ||
|
||
# Locate GTest | ||
enable_testing() | ||
find_package(GTest REQUIRED) | ||
include_directories(${GTEST_INCLUDE_DIRS}) | ||
|
||
# Link runTests with what we want to test and the GTest and pthread library | ||
add_executable(${PROJECT_NAME}_tests ${test_source_list}) | ||
target_link_libraries( | ||
${PROJECT_NAME}_tests | ||
GTest::gtest_main | ||
Utils | ||
) | ||
|
||
include(GoogleTest) | ||
gtest_discover_tests(${PROJECT_NAME}_tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Задача на сортировку | ||
|
||
В данной задаче необходимо реализовать сортировку одним из эфективных алгоритмов | ||
|
||
* Merge sort | ||
* Quick sort | ||
* Heap sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include <iostream> | ||
|
||
int main() { return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
#include <gtest/gtest.h> | ||
|
||
TEST(TopologySort, Simple) { | ||
ASSERT_EQ(1, 1); // Stack [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME) | ||
string(REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME}) | ||
project(${PROJECT_NAME} C CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
file(GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp") | ||
file(GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp") | ||
file(GLOB_RECURSE main_source_list "src/main.cpp") | ||
file(GLOB_RECURSE test_source_list "src/*.cpp") | ||
file(GLOB_RECURSE test_list "src/*test.cpp") | ||
|
||
list(REMOVE_ITEM test_source_list ${main_source_list}) | ||
list(REMOVE_ITEM source_list ${test_list}) | ||
|
||
include_directories(${PROJECT_NAME} PUBLIC src) | ||
include_directories(${PROJECT_NAME} PUBLIC ../lib/src) | ||
|
||
add_executable(${PROJECT_NAME} ${source_list}) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC Utils) | ||
|
||
# Locate GTest | ||
enable_testing() | ||
find_package(GTest REQUIRED) | ||
include_directories(${GTEST_INCLUDE_DIRS}) | ||
|
||
# Link runTests with what we want to test and the GTest and pthread library | ||
add_executable(${PROJECT_NAME}_tests ${test_source_list}) | ||
target_link_libraries( | ||
${PROJECT_NAME}_tests | ||
GTest::gtest_main | ||
Utils | ||
) | ||
|
||
include(GoogleTest) | ||
gtest_discover_tests(${PROJECT_NAME}_tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Задача на порядковые статистики | ||
|
||
В данной задаче необходимо реализовать поиск n-ой порядковой статистики |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include <iostream> | ||
|
||
int main() { return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
#include <gtest/gtest.h> | ||
|
||
TEST(TopologySort, Simple) { | ||
ASSERT_EQ(1, 1); // Stack [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME) | ||
string(REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME}) | ||
project(${PROJECT_NAME} C CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
file(GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp") | ||
file(GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp") | ||
file(GLOB_RECURSE main_source_list "src/main.cpp") | ||
file(GLOB_RECURSE test_source_list "src/*.cpp") | ||
file(GLOB_RECURSE test_list "src/*test.cpp") | ||
|
||
list(REMOVE_ITEM test_source_list ${main_source_list}) | ||
list(REMOVE_ITEM source_list ${test_list}) | ||
|
||
include_directories(${PROJECT_NAME} PUBLIC src) | ||
include_directories(${PROJECT_NAME} PUBLIC ../lib/src) | ||
|
||
add_executable(${PROJECT_NAME} ${source_list}) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC Utils) | ||
|
||
# Locate GTest | ||
enable_testing() | ||
find_package(GTest REQUIRED) | ||
include_directories(${GTEST_INCLUDE_DIRS}) | ||
|
||
# Link runTests with what we want to test and the GTest and pthread library | ||
add_executable(${PROJECT_NAME}_tests ${test_source_list}) | ||
target_link_libraries( | ||
${PROJECT_NAME}_tests | ||
GTest::gtest_main | ||
Utils | ||
) | ||
|
||
include(GoogleTest) | ||
gtest_discover_tests(${PROJECT_NAME}_tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Задача на дерево поиска | ||
|
||
В данной задаче необходимо реализовать дерево поиска |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include <iostream> | ||
|
||
int main() { return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
#include <gtest/gtest.h> | ||
|
||
TEST(TopologySort, Simple) { | ||
ASSERT_EQ(1, 1); // Stack [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME) | ||
string(REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME}) | ||
project(${PROJECT_NAME} C CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
file(GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp") | ||
file(GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp") | ||
file(GLOB_RECURSE main_source_list "src/main.cpp") | ||
file(GLOB_RECURSE test_source_list "src/*.cpp") | ||
file(GLOB_RECURSE test_list "src/*test.cpp") | ||
|
||
list(REMOVE_ITEM test_source_list ${main_source_list}) | ||
list(REMOVE_ITEM source_list ${test_list}) | ||
|
||
include_directories(${PROJECT_NAME} PUBLIC src) | ||
include_directories(${PROJECT_NAME} PUBLIC ../lib/src) | ||
|
||
add_executable(${PROJECT_NAME} ${source_list}) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC Utils) | ||
|
||
# Locate GTest | ||
enable_testing() | ||
find_package(GTest REQUIRED) | ||
include_directories(${GTEST_INCLUDE_DIRS}) | ||
|
||
# Link runTests with what we want to test and the GTest and pthread library | ||
add_executable(${PROJECT_NAME}_tests ${test_source_list}) | ||
target_link_libraries( | ||
${PROJECT_NAME}_tests | ||
GTest::gtest_main | ||
Utils | ||
) | ||
|
||
include(GoogleTest) | ||
gtest_discover_tests(${PROJECT_NAME}_tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Задача на хэш таблицу | ||
|
||
В данной задаче необходимо реализовать хэш таблицу |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include <iostream> | ||
|
||
int main() { return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
#include <gtest/gtest.h> | ||
|
||
TEST(TopologySort, Simple) { | ||
ASSERT_EQ(1, 1); // Stack [] | ||
} |