File tree Expand file tree Collapse file tree 22 files changed +292
-1
lines changed Expand file tree Collapse file tree 22 files changed +292
-1
lines changed Original file line number Diff line number Diff line change 25
25
- name : make
26
26
working-directory : ${{github.workspace}}/build
27
27
run : make
28
+
29
+ - name : Test task 01
30
+ working-directory : ${{github.workspace}}/build
31
+ run : ./task_01/task_01_tests
32
+
33
+ - name : Test task 02
34
+ working-directory : ${{github.workspace}}/build
35
+ run : ./task_02/task_02_tests
36
+
37
+ - name : Test task 03
38
+ working-directory : ${{github.workspace}}/build
39
+ run : ./task_03/task_03_tests
40
+
41
+ - name : Test task 04
42
+ working-directory : ${{github.workspace}}/build
43
+ run : ./task_04/task_04_tests
44
+
45
+ - name : Test task 05
46
+ working-directory : ${{github.workspace}}/build
47
+ run : ./task_05/task_05_tests
48
+
49
+ - name : Test task 06
50
+ working-directory : ${{github.workspace}}/build
51
+ run : ./task_06/task_06_tests
52
+
53
+ - name : Test task 07
54
+ working-directory : ${{github.workspace}}/build
55
+ run : ./task_07/task_07_tests
56
+
57
+ - name : Test task 08
58
+ working-directory : ${{github.workspace}}/build
59
+ run : ./task_08/task_08_tests
Original file line number Diff line number Diff line change 1
1
# Задача 1
2
2
3
- Дано целое число и массив целых чисел, нужно найти 2 числа из массива которые в сумме дадут заданное число
3
+ Дано целое число и отсортированый массив целых чисел, нужно найти 2 числа из массива которые в сумме дадут заданное число
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.10 )
2
+
3
+ get_filename_component (PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME )
4
+ string (REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME} )
5
+ project (${PROJECT_NAME} C CXX )
6
+
7
+ set (CMAKE_CXX_STANDARD 20 )
8
+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
9
+
10
+ file (GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp" )
11
+ file (GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp" )
12
+ file (GLOB_RECURSE main_source_list "src/main.cpp" )
13
+ file (GLOB_RECURSE test_source_list "src/*.cpp" )
14
+ file (GLOB_RECURSE test_list "src/*test.cpp" )
15
+
16
+ list (REMOVE_ITEM test_source_list ${main_source_list} )
17
+ list (REMOVE_ITEM source_list ${test_list} )
18
+
19
+ include_directories (${PROJECT_NAME} PUBLIC src )
20
+ include_directories (${PROJECT_NAME} PUBLIC ../lib/src )
21
+
22
+ add_executable (${PROJECT_NAME} ${source_list} )
23
+ target_link_libraries (${PROJECT_NAME} PUBLIC Utils )
24
+
25
+ # Locate GTest
26
+ enable_testing ()
27
+ find_package (GTest REQUIRED )
28
+ include_directories (${GTEST_INCLUDE_DIRS} )
29
+
30
+ # Link runTests with what we want to test and the GTest and pthread library
31
+ add_executable (${PROJECT_NAME} _tests ${test_source_list} )
32
+ target_link_libraries (
33
+ ${PROJECT_NAME} _tests
34
+ GTest::gtest_main
35
+ Utils
36
+ )
37
+
38
+ include (GoogleTest )
39
+ gtest_discover_tests (${PROJECT_NAME} _tests )
Original file line number Diff line number Diff line change
1
+ # Задача на кучу
2
+
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
Original file line number Diff line number Diff line change
1
+ #include < iostream>
2
+
3
+ int main () { return 0 ; }
Original file line number Diff line number Diff line change
1
+
2
+ #include < gtest/gtest.h>
3
+
4
+ TEST (TopologySort, Simple) {
5
+ ASSERT_EQ (1 , 1 ); // Stack []
6
+ }
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.10 )
2
+
3
+ get_filename_component (PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME )
4
+ string (REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME} )
5
+ project (${PROJECT_NAME} C CXX )
6
+
7
+ set (CMAKE_CXX_STANDARD 20 )
8
+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
9
+
10
+ file (GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp" )
11
+ file (GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp" )
12
+ file (GLOB_RECURSE main_source_list "src/main.cpp" )
13
+ file (GLOB_RECURSE test_source_list "src/*.cpp" )
14
+ file (GLOB_RECURSE test_list "src/*test.cpp" )
15
+
16
+ list (REMOVE_ITEM test_source_list ${main_source_list} )
17
+ list (REMOVE_ITEM source_list ${test_list} )
18
+
19
+ include_directories (${PROJECT_NAME} PUBLIC src )
20
+ include_directories (${PROJECT_NAME} PUBLIC ../lib/src )
21
+
22
+ add_executable (${PROJECT_NAME} ${source_list} )
23
+ target_link_libraries (${PROJECT_NAME} PUBLIC Utils )
24
+
25
+ # Locate GTest
26
+ enable_testing ()
27
+ find_package (GTest REQUIRED )
28
+ include_directories (${GTEST_INCLUDE_DIRS} )
29
+
30
+ # Link runTests with what we want to test and the GTest and pthread library
31
+ add_executable (${PROJECT_NAME} _tests ${test_source_list} )
32
+ target_link_libraries (
33
+ ${PROJECT_NAME} _tests
34
+ GTest::gtest_main
35
+ Utils
36
+ )
37
+
38
+ include (GoogleTest )
39
+ gtest_discover_tests (${PROJECT_NAME} _tests )
Original file line number Diff line number Diff line change
1
+ # Задача на сортировку
2
+
3
+ В данной задаче необходимо реализовать сортировку одним из эфективных алгоритмов
4
+
5
+ * Merge sort
6
+ * Quick sort
7
+ * Heap sort
Original file line number Diff line number Diff line change
1
+ #include < iostream>
2
+
3
+ int main () { return 0 ; }
Original file line number Diff line number Diff line change
1
+
2
+ #include < gtest/gtest.h>
3
+
4
+ TEST (TopologySort, Simple) {
5
+ ASSERT_EQ (1 , 1 ); // Stack []
6
+ }
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.10 )
2
+
3
+ get_filename_component (PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME )
4
+ string (REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME} )
5
+ project (${PROJECT_NAME} C CXX )
6
+
7
+ set (CMAKE_CXX_STANDARD 20 )
8
+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
9
+
10
+ file (GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp" )
11
+ file (GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp" )
12
+ file (GLOB_RECURSE main_source_list "src/main.cpp" )
13
+ file (GLOB_RECURSE test_source_list "src/*.cpp" )
14
+ file (GLOB_RECURSE test_list "src/*test.cpp" )
15
+
16
+ list (REMOVE_ITEM test_source_list ${main_source_list} )
17
+ list (REMOVE_ITEM source_list ${test_list} )
18
+
19
+ include_directories (${PROJECT_NAME} PUBLIC src )
20
+ include_directories (${PROJECT_NAME} PUBLIC ../lib/src )
21
+
22
+ add_executable (${PROJECT_NAME} ${source_list} )
23
+ target_link_libraries (${PROJECT_NAME} PUBLIC Utils )
24
+
25
+ # Locate GTest
26
+ enable_testing ()
27
+ find_package (GTest REQUIRED )
28
+ include_directories (${GTEST_INCLUDE_DIRS} )
29
+
30
+ # Link runTests with what we want to test and the GTest and pthread library
31
+ add_executable (${PROJECT_NAME} _tests ${test_source_list} )
32
+ target_link_libraries (
33
+ ${PROJECT_NAME} _tests
34
+ GTest::gtest_main
35
+ Utils
36
+ )
37
+
38
+ include (GoogleTest )
39
+ gtest_discover_tests (${PROJECT_NAME} _tests )
Original file line number Diff line number Diff line change
1
+ # Задача на порядковые статистики
2
+
3
+ В данной задаче необходимо реализовать поиск n-ой порядковой статистики
Original file line number Diff line number Diff line change
1
+ #include < iostream>
2
+
3
+ int main () { return 0 ; }
Original file line number Diff line number Diff line change
1
+
2
+ #include < gtest/gtest.h>
3
+
4
+ TEST (TopologySort, Simple) {
5
+ ASSERT_EQ (1 , 1 ); // Stack []
6
+ }
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.10 )
2
+
3
+ get_filename_component (PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME )
4
+ string (REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME} )
5
+ project (${PROJECT_NAME} C CXX )
6
+
7
+ set (CMAKE_CXX_STANDARD 20 )
8
+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
9
+
10
+ file (GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp" )
11
+ file (GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp" )
12
+ file (GLOB_RECURSE main_source_list "src/main.cpp" )
13
+ file (GLOB_RECURSE test_source_list "src/*.cpp" )
14
+ file (GLOB_RECURSE test_list "src/*test.cpp" )
15
+
16
+ list (REMOVE_ITEM test_source_list ${main_source_list} )
17
+ list (REMOVE_ITEM source_list ${test_list} )
18
+
19
+ include_directories (${PROJECT_NAME} PUBLIC src )
20
+ include_directories (${PROJECT_NAME} PUBLIC ../lib/src )
21
+
22
+ add_executable (${PROJECT_NAME} ${source_list} )
23
+ target_link_libraries (${PROJECT_NAME} PUBLIC Utils )
24
+
25
+ # Locate GTest
26
+ enable_testing ()
27
+ find_package (GTest REQUIRED )
28
+ include_directories (${GTEST_INCLUDE_DIRS} )
29
+
30
+ # Link runTests with what we want to test and the GTest and pthread library
31
+ add_executable (${PROJECT_NAME} _tests ${test_source_list} )
32
+ target_link_libraries (
33
+ ${PROJECT_NAME} _tests
34
+ GTest::gtest_main
35
+ Utils
36
+ )
37
+
38
+ include (GoogleTest )
39
+ gtest_discover_tests (${PROJECT_NAME} _tests )
Original file line number Diff line number Diff line change
1
+ # Задача на дерево поиска
2
+
3
+ В данной задаче необходимо реализовать дерево поиска
Original file line number Diff line number Diff line change
1
+ #include < iostream>
2
+
3
+ int main () { return 0 ; }
Original file line number Diff line number Diff line change
1
+
2
+ #include < gtest/gtest.h>
3
+
4
+ TEST (TopologySort, Simple) {
5
+ ASSERT_EQ (1 , 1 ); // Stack []
6
+ }
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.10 )
2
+
3
+ get_filename_component (PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME )
4
+ string (REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME} )
5
+ project (${PROJECT_NAME} C CXX )
6
+
7
+ set (CMAKE_CXX_STANDARD 20 )
8
+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
9
+
10
+ file (GLOB_RECURSE source_list "src/*.cpp" "src/*.hpp" )
11
+ file (GLOB_RECURSE lib_source_list "../lib/src/*.cpp" "../lib/src/*.hpp" )
12
+ file (GLOB_RECURSE main_source_list "src/main.cpp" )
13
+ file (GLOB_RECURSE test_source_list "src/*.cpp" )
14
+ file (GLOB_RECURSE test_list "src/*test.cpp" )
15
+
16
+ list (REMOVE_ITEM test_source_list ${main_source_list} )
17
+ list (REMOVE_ITEM source_list ${test_list} )
18
+
19
+ include_directories (${PROJECT_NAME} PUBLIC src )
20
+ include_directories (${PROJECT_NAME} PUBLIC ../lib/src )
21
+
22
+ add_executable (${PROJECT_NAME} ${source_list} )
23
+ target_link_libraries (${PROJECT_NAME} PUBLIC Utils )
24
+
25
+ # Locate GTest
26
+ enable_testing ()
27
+ find_package (GTest REQUIRED )
28
+ include_directories (${GTEST_INCLUDE_DIRS} )
29
+
30
+ # Link runTests with what we want to test and the GTest and pthread library
31
+ add_executable (${PROJECT_NAME} _tests ${test_source_list} )
32
+ target_link_libraries (
33
+ ${PROJECT_NAME} _tests
34
+ GTest::gtest_main
35
+ Utils
36
+ )
37
+
38
+ include (GoogleTest )
39
+ gtest_discover_tests (${PROJECT_NAME} _tests )
Original file line number Diff line number Diff line change
1
+ # Задача на хэш таблицу
2
+
3
+ В данной задаче необходимо реализовать хэш таблицу
Original file line number Diff line number Diff line change
1
+ #include < iostream>
2
+
3
+ int main () { return 0 ; }
Original file line number Diff line number Diff line change
1
+
2
+ #include < gtest/gtest.h>
3
+
4
+ TEST (TopologySort, Simple) {
5
+ ASSERT_EQ (1 , 1 ); // Stack []
6
+ }
You can’t perform that action at this time.
0 commit comments