diff options
Diffstat (limited to 'Semestr 4/ask/lista5/zad2.c')
-rw-r--r-- | Semestr 4/ask/lista5/zad2.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/Semestr 4/ask/lista5/zad2.c b/Semestr 4/ask/lista5/zad2.c deleted file mode 100644 index ab9cb54..0000000 --- a/Semestr 4/ask/lista5/zad2.c +++ /dev/null @@ -1,44 +0,0 @@ -#include <stdio.h> -#include <stdint.h> - -long puzzle2(char *rdi /* rdi */, char *rsi /* rsi */) { - char *rax = rdi; -L3: - char r9b = *rax; - char *r8 = rax + 1; - char *rdx = rsi; -L2: - char cl = *rdx; - rdx++; - if (cl == 0) { - goto L4; - } - if (cl != r9b) { - goto L2; - } - rax = r8; - goto L3; -L4: - return rax - rdi; -} - - -// funkcja sprawdza jaka jest pierwsza litera z s która nie występuje w d -// jesli wszystkie występują, to zwróci długość s. -long puzzle2_decoded(char *s /* rdi */, char *d /* rsi */) { - for (char *result = s ; ; result++) { - char first = *result; - char *crawl = d; - for (char *crawl = d; *crawl != first; crawl++) { - if (*crawl == 0) { - return result - s; - } - } - } -} - - - -int main() { - -}
\ No newline at end of file |