-
Notifications
You must be signed in to change notification settings - Fork 361
Lab3 #1564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Lab3 #1564
Changes from 47 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
2311dec
2
YeeeeRE 2d557f5
lab2 1st try
Kulebyak291 8775c18
lab2 1st 1st try
Kulebyak291 2f6677b
fix
Kulebyak291 b1e41a4
fix
Kulebyak291 00aced7
add vector n stack tests
Kulebyak291 d029fb8
777
Kulebyak291 35b8542
777
8f645ae
776
6211ca9
775
56012a1
774
cfdd4ef
lab3 1sttry
30db81c
lab3
9c404e0
lab3.1
838b259
lab3.2
c0a3cda
lab3.3
2e4b221
lab3.4
f6e863b
lab3.5
348182c
3.6
d29ac0d
3.6.1
15598c8
3.6.2
d8fa329
3.6.3
723478d
3.6.4
23ee5f0
3.6.5
46b2be9
fix path
1b85ba8
11
536ac1c
11/1
e39a5c8
11/2
7b017c6
11/3
207695b
11/4
5f54f6a
11/5
b2a831d
11/6
f33e939
12/1
f4c8018
12/2
f2bff6d
12/2
b988ae0
12/3
dbb58af
12/4
86f204b
13/1
4f81374
13/1
201a89a
13/1
328a26e
.
83d1dbe
..
a27b13c
...
d5509fb
...
2bfdf73
...
ca7766a
m
a58f79b
m
953b1e0
переделал
e805348
переделал 2
07ad071
переделал 2.1
abda0c3
переделал 3
d1c950c
переделал 3.1
1e46d9d
perdelal
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,20 @@ | ||
| name: cpp-linter | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| cpp-linter: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: cpp-linter/cpp-linter-action@v2 | ||
| id: linter | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| style: file | ||
| tidy-checks: 'bugprone-*,performance-*,clang-analyzer-*,cppcoreguidelines-*,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-init-variables,-cppcoreguidelines-owning-memory,-cppcoreguidelines-no-malloc,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-vararg,-bugprone-infinite-loop' |
This file contains hidden or 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 hidden or 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 @@ | ||
| OLEG PAVLOV 4091 LAB2 |
This file contains hidden or 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 @@ | ||
| LAB2 PAVLOV OLEG 4091 |
This file contains hidden or 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 hidden or 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 @@ | ||
| add_executable(Lab1CPP lab1.cpp) | ||
| target_include_directories(Lab1CPP PUBLIC ../LibraryCPP) | ||
| target_link_libraries(Lab1CPP LibraryCPP) | ||
|
|
||
| add_test(NAME TestLab1CPP COMMAND $<TARGET_FILE:Lab1CPP> ${CMAKE_CURRENT_SOURCE_DIR}/input.txt) | ||
| set_property(TEST TestLab1CPP PROPERTY PASS_REGULAR_EXPRESSION "Max odd sequence length: 3.*Array after right shift by 2: 0 0 1 3 5 2 7 9 11 4") |
This file contains hidden or 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,4 @@ | ||
| 10 | ||
| 1 3 5 2 7 9 11 4 6 8 | ||
| 2 | ||
| right |
This file contains hidden or 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,101 @@ | ||
| #include "array.h" | ||
| #include <iostream> | ||
| #include <fstream> | ||
| #include <string> | ||
|
|
||
| using namespace std; | ||
|
|
||
| size_t longest_odd_sequence(const Array* arr) { | ||
| size_t max_len = 0; | ||
| size_t current_len = 0; | ||
|
|
||
| for (size_t i = 0; i < array_size(arr); ++i) { | ||
| if (array_get(arr, i) % 2 != 0) { | ||
| current_len++; | ||
| if (current_len > max_len) max_len = current_len; | ||
| } | ||
| else { | ||
| current_len = 0; | ||
| } | ||
| } | ||
|
|
||
| return max_len; | ||
| } | ||
|
|
||
| void shift_array(Array* arr, int steps, bool left) { | ||
| ssize_t n = static_cast<ssize_t>(array_size(arr)); | ||
| if (left) { | ||
| for (ssize_t i = 0; i < n - steps; ++i) { | ||
| array_set(arr, i, array_get(arr, i + steps)); | ||
| } | ||
| for (ssize_t i = n - steps; i < n; ++i) { | ||
| array_set(arr, i, 0); | ||
| } | ||
| } | ||
| else { //vpravo | ||
| for (ssize_t i = n - 1; i >= steps; --i) { | ||
| array_set(arr, i, array_get(arr, i - steps)); | ||
| } | ||
| for (ssize_t i = 0; i < steps; ++i) { | ||
| array_set(arr, i, 0); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| int main(int argc, char* argv[]) | ||
| { | ||
| string input_filename = (argc > 1) ? argv[1] : "input.txt"; | ||
| ifstream input(input_filename); | ||
| if (!input.is_open()) { | ||
| cerr << "Cannot open " << input_filename << endl; | ||
| return 1; | ||
| } | ||
|
|
||
| size_t n; | ||
| input >> n; | ||
|
|
||
| Array* arr = array_create(n); | ||
|
|
||
| for (size_t i = 0; i < n; ++i) { | ||
| int sdvig; | ||
| input >> sdvig; | ||
| array_set(arr, i, sdvig); | ||
| } | ||
|
|
||
| int steps; | ||
| input >> steps; | ||
|
|
||
| string napravlenie; | ||
| input >> napravlenie; | ||
| bool left = (napravlenie == "left"); | ||
|
|
||
| ofstream output("output.txt"); | ||
| if (!output.is_open()) { | ||
| cerr << "Cannot create output.txt" << endl; | ||
| array_delete(arr); | ||
| return 1; | ||
| } | ||
|
|
||
| size_t max_len = longest_odd_sequence(arr); | ||
| cout << "Max odd sequence length: " << max_len << endl; | ||
| output << max_len << endl; | ||
|
|
||
| Array* shifted_arr = array_create(n); | ||
| for (size_t i = 0; i < n; ++i) { | ||
| array_set(shifted_arr, i, array_get(arr, i)); | ||
| } | ||
| shift_array(shifted_arr, steps, left); | ||
| cout << "Array after " << napravlenie << " shift by " << steps << ": "; | ||
| for (size_t i = 0; i < array_size(shifted_arr); ++i) { | ||
| cout << array_get(shifted_arr, i) << " "; | ||
| output << array_get(shifted_arr, i) << " "; | ||
| } | ||
| cout << endl; | ||
|
|
||
| output << endl; | ||
|
|
||
| array_delete(arr); | ||
| array_delete(shifted_arr); | ||
|
|
||
| return 0; | ||
| } | ||
This file contains hidden or 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,18 @@ | ||
| add_executable(Lab2CPP main.cpp) | ||
| target_include_directories(Lab2CPP PUBLIC ../LibraryCPP) | ||
| target_link_libraries(Lab2CPP LibraryCPP) | ||
|
|
||
| add_test(NAME TestLab2_1 COMMAND Lab2CPP ${CMAKE_CURRENT_SOURCE_DIR}/input1.txt) | ||
| set_property(TEST TestLab2_1 PROPERTY PASS_REGULAR_EXPRESSION "9") | ||
|
|
||
| add_test(NAME TestLab2_2 COMMAND Lab2CPP ${CMAKE_CURRENT_SOURCE_DIR}/input2.txt) | ||
| set_property(TEST TestLab2_2 PROPERTY PASS_REGULAR_EXPRESSION "3") | ||
|
|
||
| add_test(NAME TestLab2_3 COMMAND Lab2CPP ${CMAKE_CURRENT_SOURCE_DIR}/input3.txt) | ||
| set_property(TEST TestLab2_3 PROPERTY PASS_REGULAR_EXPRESSION "1") | ||
|
|
||
| add_test(NAME TestLab2_4 COMMAND Lab2CPP ${CMAKE_CURRENT_SOURCE_DIR}/input4.txt) | ||
| set_property(TEST TestLab2_4 PROPERTY PASS_REGULAR_EXPRESSION "14") | ||
|
|
||
| add_test(NAME TestLab2_Invalid COMMAND Lab2CPP ${CMAKE_CURRENT_SOURCE_DIR}/input_invalid.txt) | ||
| set_property(TEST TestLab2_Invalid PROPERTY PASS_REGULAR_EXPRESSION "Invalid expression") |
This file contains hidden or 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 @@ | ||
| 1 2 + 3 * |
This file contains hidden or 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 @@ | ||
| 1 2 + 3 * |
This file contains hidden or 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 @@ | ||
| 2 10 9 - + |
This file contains hidden or 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 @@ | ||
| 5 5 / |
This file contains hidden or 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 4 + 2 * |
This file contains hidden or 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 @@ | ||
| 1 + |
This file contains hidden or 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,77 @@ | ||
| #include "stack.h" | ||
| #include <iostream> | ||
| #include <fstream> | ||
| #include <sstream> | ||
| #include <string> | ||
|
|
||
| using namespace std; | ||
|
|
||
| int main(int argc, char* argv[]) { | ||
| string input_filename = (argc > 1) ? argv[1] : "input.txt"; | ||
| ifstream input(input_filename); | ||
| if (!input.is_open()) { | ||
| cerr << "Cannot open " << input_filename << endl; | ||
| return 1; | ||
| } | ||
|
|
||
| string line; | ||
| if (!getline(input, line)) { | ||
| cerr << "Empty input file" << endl; | ||
| return 1; | ||
| } | ||
|
|
||
| istringstream iss(line); | ||
| Stack* stk = stack_create(); | ||
| string token; | ||
|
|
||
| while (iss >> token) { | ||
| if (token == "+" || token == "-" || token == "*" || token == "/") { | ||
|
|
||
| if (stack_empty(stk)) { | ||
| cerr << "Invalid expression" << endl; //минимум один элемент перед a (вторым элементом; aka 1 2 +, - > b=1 - >... | ||
| stack_delete(stk); | ||
| return 1; | ||
| } | ||
| Data b = stack_get(stk); | ||
| stack_pop(stk); | ||
| if (stack_empty(stk)) { | ||
| cerr << "Invalid expression" << endl; // стек пуст после b (второй операнд) - > элементов (<2) - > ошибка | ||
| stack_delete(stk); | ||
| return 1; | ||
| } | ||
| Data a = stack_get(stk); | ||
| stack_pop(stk); //...- > a=1, b=2) | ||
| Data res = 0; | ||
| if (token == "+") res = a + b; | ||
| else if (token == "-") res = a - b; | ||
| else if (token == "*") res = a * b; | ||
| else if (token == "/") { | ||
| if (b == 0) { | ||
| cerr << "Division by zero" << endl; | ||
| stack_delete(stk); | ||
| return 1; | ||
| } | ||
| res = a / b; | ||
| } | ||
| stack_push(stk, res); | ||
| } else { | ||
| try { | ||
| Data num = stoi(token); | ||
| stack_push(stk, num); | ||
| } catch (...) { | ||
| cerr << "Invalid number: " << token << endl; | ||
| stack_delete(stk); | ||
| return 1; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| if (stack_empty(stk)) { | ||
| cerr << "Empty expression" << endl; | ||
| } else { | ||
| cout << stack_get(stk) << endl; | ||
| } | ||
|
|
||
| stack_delete(stk); | ||
| return 0; | ||
| } | ||
This file contains hidden or 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,59 @@ | ||
| add_executable(Lab3CPP main.cpp) | ||
| target_include_directories(Lab3CPP PRIVATE ../LibraryCPP) | ||
| target_link_libraries(Lab3CPP LibraryCPP) | ||
|
|
||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input.txt ${CMAKE_CURRENT_BINARY_DIR}/input.txt COPYONLY) | ||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input1.txt ${CMAKE_CURRENT_BINARY_DIR}/input1.txt COPYONLY) | ||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input2.txt ${CMAKE_CURRENT_BINARY_DIR}/input2.txt COPYONLY) | ||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input3.txt ${CMAKE_CURRENT_BINARY_DIR}/input3.txt COPYONLY) | ||
|
|
||
| enable_testing() | ||
|
|
||
| ############################ | ||
| add_test(NAME TestLab3 COMMAND ${CMAKE_COMMAND} -E echo "Running TestLab3") | ||
| set_tests_properties(TestLab3 PROPERTIES FIXTURES_SETUP TestLab3Fixture) | ||
|
|
||
| add_test(NAME TestLab3_Run COMMAND $<TARGET_FILE:Lab3CPP> ${CMAKE_CURRENT_SOURCE_DIR}/input.txt) | ||
| set_tests_properties(TestLab3_Run PROPERTIES FIXTURES_REQUIRED TestLab3Fixture) | ||
| set_property(TEST TestLab3_Run PROPERTY ENVIRONMENT "TEST_OUTPUT=${CMAKE_CURRENT_BINARY_DIR}/testlab3_output.txt") | ||
| set_property(TEST TestLab3_Run PROPERTY PASS_REGULAR_EXPRESSION ".*") | ||
|
|
||
| add_test(NAME TestLab3_Verify COMMAND ${CMAKE_COMMAND} -E compare_files | ||
| ${CMAKE_CURRENT_BINARY_DIR}/testlab3_output.txt | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/expected_testlab3.txt | ||
| ) | ||
| set_tests_properties(TestLab3_Verify PROPERTIES FIXTURES_CLEANUP TestLab3Fixture DEPENDS TestLab3_Run) | ||
|
|
||
| ######################## | ||
| add_test(NAME TestLab3_1 COMMAND ${CMAKE_COMMAND} -E echo "Running TestLab3_1") | ||
| set_tests_properties(TestLab3_1 PROPERTIES FIXTURES_SETUP TestLab3_1Fixture) | ||
|
|
||
| add_test(NAME TestLab3_1_Run COMMAND $<TARGET_FILE:Lab3CPP> ${CMAKE_CURRENT_SOURCE_DIR}/input1.txt) | ||
| set_tests_properties(TestLab3_1_Run PROPERTIES FIXTURES_REQUIRED TestLab3_1Fixture) | ||
| set_property(TEST TestLab3_1_Run PROPERTY ENVIRONMENT "TEST_OUTPUT=${CMAKE_CURRENT_BINARY_DIR}/testlab3_1_output.txt") | ||
| set_property(TEST TestLab3_1_Run PROPERTY PASS_REGULAR_EXPRESSION ".*") | ||
|
|
||
| add_test(NAME TestLab3_1_Verify COMMAND ${CMAKE_COMMAND} -E compare_files | ||
| ${CMAKE_CURRENT_BINARY_DIR}/testlab3_1_output.txt | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/expected_testlab3_1.txt | ||
| ) | ||
| set_tests_properties(TestLab3_1_Verify PROPERTIES FIXTURES_CLEANUP TestLab3_1Fixture DEPENDS TestLab3_1_Run) | ||
|
|
||
| ########################## | ||
| add_test(NAME TestLab3_2 COMMAND ${CMAKE_COMMAND} -E echo "Running TestLab3_2") | ||
| set_tests_properties(TestLab3_2 PROPERTIES FIXTURES_SETUP TestLab3_2Fixture) | ||
|
|
||
| add_test(NAME TestLab3_2_Run COMMAND $<TARGET_FILE:Lab3CPP> ${CMAKE_CURRENT_SOURCE_DIR}/input2.txt) | ||
| set_tests_properties(TestLab3_2_Run PROPERTIES FIXTURES_REQUIRED TestLab3_2Fixture) | ||
| set_property(TEST TestLab3_2_Run PROPERTY ENVIRONMENT "TEST_OUTPUT=${CMAKE_CURRENT_BINARY_DIR}/testlab3_2_output.txt") | ||
| set_property(TEST TestLab3_2_Run PROPERTY PASS_REGULAR_EXPRESSION ".*") | ||
|
|
||
| add_test(NAME TestLab3_2_Verify COMMAND ${CMAKE_COMMAND} -E compare_files | ||
| ${CMAKE_CURRENT_BINARY_DIR}/testlab3_2_output.txt | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/expected_testlab3_2.txt | ||
| ) | ||
| set_tests_properties(TestLab3_2_Verify PROPERTIES FIXTURES_CLEANUP TestLab3_2Fixture DEPENDS TestLab3_2_Run) | ||
|
|
||
| ################### | ||
| add_test(NAME TestLab3_3 COMMAND $<TARGET_FILE:Lab3CPP> ${CMAKE_CURRENT_SOURCE_DIR}/input3.txt) | ||
| set_property(TEST TestLab3_3 PROPERTY PASS_REGULAR_EXPRESSION "^-1\n$") |
This file contains hidden or 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,16 @@ | ||
| 7 | ||
| Path: (0,0) -> (0,1) -> (0,2) -> (0,3) -> (0,4) -> (1,4) -> (1,5) -> (2,5) | ||
| Maze with path: | ||
| / \ / \ / \ / \ / \ / \ | ||
| | S | . | # | . | . | . | | ||
| \ / \ / \ / \ / \ / \ / | ||
| | x | # | . | E | . | . | | ||
| \ / \ / \ / \ / \ / \ / | ||
| | x | . | # | . | . | . | | ||
| \ / \ / \ / \ / \ / \ / | ||
| | x | # | . | . | # | . | | ||
| \ / \ / \ / \ / \ / \ / | ||
| | x | x | . | # | . | . | | ||
| \ / \ / \ / \ / \ / \ / | ||
| | # | x | E | . | . | . | | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Тут шаг по диагонали, который не был предусмотрен правилами. |
||
| \ / \ / \ / \ / \ / \ / | ||
This file contains hidden or 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,8 @@ | ||
| 2 | ||
| Path: (0,0) -> (1,0) -> (2,0) | ||
| Maze with path: | ||
| / \ / \ / \ | ||
| | S | x | E | | ||
| \ / \ / \ / | ||
| | . | . | . | | ||
| \ / \ / \ / |
This file contains hidden or 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,12 @@ | ||
| 6 | ||
| Path: (0,0) -> (0,1) -> (0,2) -> (0,3) -> (1,3) -> (2,3) -> (3,3) | ||
| Maze with path: | ||
| / \ / \ / \ / \ | ||
| | S | . | . | . | | ||
| \ / \ / \ / \ / | ||
| | x | # | . | . | | ||
| \ / \ / \ / \ / | ||
| | x | . | # | . | | ||
| \ / \ / \ / \ / | ||
| | x | x | x | E | | ||
| \ / \ / \ / \ / |
This file contains hidden or 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 @@ | ||
| S.#... | ||
| .#.E.. | ||
| ..#... | ||
| .#..#. | ||
| ...#.. | ||
| #.E... |
This file contains hidden or 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,2 @@ | ||
| S.E | ||
| ... |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Опции компиляции удалять нельзя.