Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commitad3ef41fdea142a915a64e12a3a2d81dcd29c731 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-01-09 17:07:09 +0200
Committer
 GitHub <noreply@github.com>
2021-01-09 17:07:09 +0200
Files2985f52c60ab0b384c24bb4f0dbfefae437f5cf2
Introduction_to_programming_FMI-ad3ef41fdea142a915a64e12a3a2d81dcd29c731.tar
Introduction_to_programming_FMI-ad3ef41fdea142a915a64e12a3a2d81dcd29c731.tar.gz
Introduction_to_programming_FMI-ad3ef41fdea142a915a64e12a3a2d81dcd29c731.zip
Parent2ecab34dd7023fa3402d7f113acb7c602036f208 (diff)
Update task6.cpp
1 files changed, 3 insertions, 3 deletions
-rw-r--r--Sem. 14/task6.cpp6
diff --git a/Sem. 14/task6.cpp b/Sem. 14/task6.cpp
index f389bcf..24107d7 100644
--- a/Sem. 14/task6.cpp
+++ b/Sem. 14/task6.cpp
@@ -20,14 +20,14 @@ bool canBeCovered(int n, int m)
- //if the plate 2x1 stands in the top left corner
+ //if the plate 1x2 stands in the top left corner
bool case1 = (m >=2 && canBeCovered(n - 1, 2) && canBeCovered(n, m - 2)) //try cut vertically
|| (n>=1 && canBeCovered(n-1, m) && canBeCovered(1, m-2)); //try cut horizontaly
if (case1)
return true;
- //if the plate 1x3 stands in the top left corner
+ //if the plate 3x1 stands in the top left corner
bool case2 = (m >= 1 && canBeCovered(n - 3, 1) && canBeCovered(n, m - 1)) //try cut vertically
|| (n>=3 && canBeCovered(3, m - 1) && canBeCovered(n - 3, m)); //try cut horizontaly
@@ -39,4 +39,4 @@ int main()
cout << canBeCovered(4, 3);
-} \ No newline at end of file
+}