From ca9ded8e10e8d0591ec4ba50f6f2d7f8af87b914 Mon Sep 17 00:00:00 2001 From: vj586da Date: Mon, 24 Jan 2022 00:15:28 +0100 Subject: [PATCH] update --- sk1a/main.c | 14 +++++++++++--- sk1a/main.o | Bin 5208 -> 5512 bytes sk1a/maze.c | 11 ++++------- sk1a/maze.o | Bin 3440 -> 4080 bytes sk1a/program | Bin 18816 -> 18952 bytes 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/sk1a/main.c b/sk1a/main.c index 7d3bac0..65f2025 100644 --- a/sk1a/main.c +++ b/sk1a/main.c @@ -1,4 +1,4 @@ -#define SZ 2 +#define SZ 10 #include #include #include "maze.h" @@ -14,8 +14,16 @@ void print_solution(char* matrix,int sz){ int main(){ char tmaze[SZ+1][SZ+1]={ - "* ", - " " + "* ", + "x x xx ", + " xxx ", + " x x ", + " x x", + "xxxxxxx ", + " ", + "x xxxxxxxx", + " xx ", + " xx " }; char maze[SZ*SZ]; memset(maze,' ',SZ*SZ); diff --git a/sk1a/main.o b/sk1a/main.o index b67a4f16a6cf21930c45de96cb081640e7d813e6..081eb03b7fa527d9e3c88da69d7192c88aed52f8 100644 GIT binary patch delta 1811 zcmZXU4Nw$i7{_<_j=S6AKK3}^1S6M%^Y{?&lrB&~k+04Cq6{sOAwfm6{2*%;^-gnBS(-uJPy>Ci-CCvfPHxwz@xJWu)T(f zw?v`<6FeLZ1tgYWU>Qt2e8vh4;OPa6QVgtx2|Z)|6M#o+03FIOP%Z*n1fV9n?nDVe z*oY2RSl{j&FcIAjDXPL4;=3J+k?VqL;hHP%sTKgP*w4BAoNs{QNIyqH`Zb9j&XXl*T; zn1h3MD4{9m!XvsIDk$6A(HVHjFbOP!esYEdGH@peF(_V)-1B?Oy**y8wSJK9EYZ|SiBnR8=^X-CCBINZ6mV;zfLW@r z-4|cu>G;b&wydJ^LbI=wZyKDpH=>i(L?nl_w49!^sN|A2dDqY9TD*zu0Zp&+$nMoX zotS6VI#ur6x~F zSyVygZfj1-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XZGsaG_JO()qd^YXu7QG0PoBGeT z@Wd8=00m3_`Cwka@1p|TXhICDqaEFw%i{gd@d6f`fl?p~w>+1Hg+A*BRRS4028@CN zG!87lI2Tj}NO3;Q9sy#Zj5y0GQ@~N73{XN*xQ%60toMhW)?WlwLK)f%rr7%azE0t3 zl)lKZqCMC;AC!pFv8VL44yCU(aEiz+uw6_NPuVHAfm~b$G9eR2FA-WKI40hUc?j^i zIGspl_j3eH@ulF2SWaxPjDjhYkXU6PD3PQS3i?=}xqQ+gi5#;B0xwLgvxy#GB2_9U zF8lr>2y)KH)Inx1k13Y=x;mvKmc`qgzCD;Ea@f3r=@Bd^K4O_drbn int paths(char* maze, int journey, int size){ - printf("journy je:%d\n",journey); + //printf("index: %d\n",journey); if(journey == size*size-1){ maze[journey]= '*'; @@ -18,7 +18,6 @@ int paths(char* maze, int journey, int size){ //Pohyb dole if(journey < (size * size) - (size)){ - puts("dole"); if(paths(maze, journey+size, size)){ return 1; } @@ -27,7 +26,6 @@ int paths(char* maze, int journey, int size){ //Pohyb vpravo if((journey+1)%size!=0) { - puts("vpravo"); if (paths(maze, journey + 1, size)) { return 1; } @@ -37,14 +35,13 @@ int paths(char* maze, int journey, int size){ if(paths(maze, journey-size, size)){ return 1; } - +/* //Pohyb vlavo - if((journey%size)!=0){ - puts("vlavo"); + if((size%journey)!=0){ if(paths(maze, journey-1, size)) return 1; } - +*/ maze[journey] = ' '; return 0; } diff --git a/sk1a/maze.o b/sk1a/maze.o index eac353ebeedeb52af4eb000bab8a299b77815e2e..e95d95eaf29d8be0d248f88a5a9e27ebb5da2036 100644 GIT binary patch literal 4080 zcmbVOc~n$o6#r&X7TH2UP@$JwxG;jI23Zcm$hhY+MOFu9V1P-sW(FE9jwC`%grXjf zdcs7lY(2S@nM;9Kk(x?H`^juU%S<|9nl1L-_wL2#=hz?KbKbl6{_g#K_kPR!W|o>} zPSt8Oj6}okVplvu87m3AVjE@C$Rb$;vzWa#mabY;SLkcam8UgH zrtZ=Kw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