From 59f7eead8962180d0fd8b5728f7c2b572e833ad9 Mon Sep 17 00:00:00 2001 From: Simoes Lukas Date: Tue, 7 Jan 2025 15:07:12 +0100 Subject: [PATCH] A --- DEV1.1/CM2/Makefile | 24 +++ DEV1.1/CM2/melange.c | 23 +++ DEV1.1/CM2/mesure.c | 10 ++ DEV1.1/CM2/moderation.c | 69 ++++++++ DEV1.1/CM2/moyenne.c | 8 + DEV1.1/CM2/moyenne.h | 6 + DEV1.1/CM2/moyenne_main.c | 14 ++ DEV1.1/CM2/toto.c | 6 + .../Entrainements/controle_machine_2_A/reitne | Bin 0 -> 4 bytes .../controle_machine_2_B/Makefile | 32 +++- DEV1.1/Entrainements/controle_machine_2_B/but | Bin 0 -> 15688 bytes .../Entrainements/controle_machine_2_B/hue.c | 4 +- DEV1.1/TP28/test.c | 22 ++- DEV1.1/TP29/TP29_reponses.txt | 4 + DEV1.1/TP29/test.c | 50 ++++++ DEV1.1/TP30/TP30_reponses.txt | 4 + DEV1.1/TP30/test.c | 153 ++++++++++++++++++ DEV1.1/TP31/TP31_reponses.txt | 0 DEV1.1/TP31/test.c | 61 +++++++ DEV1.1/commande_grep | 1 + DEV1.1/simoes_CM2.tar.gz | Bin 0 -> 1587 bytes 21 files changed, 475 insertions(+), 16 deletions(-) create mode 100644 DEV1.1/CM2/Makefile create mode 100644 DEV1.1/CM2/melange.c create mode 100644 DEV1.1/CM2/mesure.c create mode 100644 DEV1.1/CM2/moderation.c create mode 100644 DEV1.1/CM2/moyenne.c create mode 100644 DEV1.1/CM2/moyenne.h create mode 100644 DEV1.1/CM2/moyenne_main.c create mode 100644 DEV1.1/CM2/toto.c create mode 100644 DEV1.1/Entrainements/controle_machine_2_A/reitne create mode 100755 DEV1.1/Entrainements/controle_machine_2_B/but create mode 100644 DEV1.1/TP29/TP29_reponses.txt create mode 100644 DEV1.1/TP29/test.c create mode 100644 DEV1.1/TP30/TP30_reponses.txt create mode 100644 DEV1.1/TP30/test.c create mode 100644 DEV1.1/TP31/TP31_reponses.txt create mode 100644 DEV1.1/TP31/test.c create mode 100644 DEV1.1/commande_grep create mode 100644 DEV1.1/simoes_CM2.tar.gz diff --git a/DEV1.1/CM2/Makefile b/DEV1.1/CM2/Makefile new file mode 100644 index 0000000..fd1a0ba --- /dev/null +++ b/DEV1.1/CM2/Makefile @@ -0,0 +1,24 @@ +CC = gcc +CFLAGS = -ansi \ + -pedantic +EXE = final +OFILES = moyenne.o \ + moyenne_main.o + +### BUT PAR DEFAUT ### + +final : ${EXE} + +### REGLES ESSENTIELLES ### + +moyenne_main.o : moyenne_main.c + +moyenne.o : moyenne.h moyenne.c + +${EXE} : ${OFILES} + $(CC) $(CFLAGS) -o ${EXE} ${OFILES} + +### REGLES OPTIONNELLES ### + +clean : + -rm -f ${OFILES} ${EXE} \ No newline at end of file diff --git a/DEV1.1/CM2/melange.c b/DEV1.1/CM2/melange.c new file mode 100644 index 0000000..5b37669 --- /dev/null +++ b/DEV1.1/CM2/melange.c @@ -0,0 +1,23 @@ +# include +# include + +int main(int argc, char** argv) { + FILE* fichier = NULL; + char premier_octet; + char resultat; + if (argc != 2) { + printf("Pas de fichier à modifier.\n"); + return EXIT_FAILURE; + } + fichier = fopen(argv[1], "r"); + if (fichier == NULL) { + printf("Erreur d'ouverture.\n"); + return EXIT_FAILURE; + } + fread(&premier_octet, 1, 1, fichier); + fclose(fichier); + fichier = fopen(argv[1], "a+"); + /* Pas fini */ + fclose(fichier); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/CM2/mesure.c b/DEV1.1/CM2/mesure.c new file mode 100644 index 0000000..5b19054 --- /dev/null +++ b/DEV1.1/CM2/mesure.c @@ -0,0 +1,10 @@ +# include +# include +# include + +int main(int argc, char** argv) { + struct stat a; + stat(argv[1], &a); + printf("%jd octets\n", a.st_size); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/CM2/moderation.c b/DEV1.1/CM2/moderation.c new file mode 100644 index 0000000..64f1cec --- /dev/null +++ b/DEV1.1/CM2/moderation.c @@ -0,0 +1,69 @@ +# include +# include + +struct mail { + double x; + double y; + struct mail* suivant; +}; + +typedef struct mail maillon; + +void afficher_liste(maillon* liste) { + maillon* p; + for (p = liste; p != NULL; p = p->suivant) { + printf("(%.1f, %.1f) -> ", p->x, p->y); + } + putchar('\n'); +} + +maillon* creation_liste(void) { + int i; + maillon* p; + maillon* premier; + maillon* s; + srand(time(NULL)); + premier = (maillon*) malloc(sizeof(maillon)); + if (!premier) { + printf("Erreur d'allocation mémoire. (1) \n"); + } + premier->x = -12; /* Le premier maillon sera toujours négatif, les autres seront aléatoires */ + premier->y = -3; + p = premier; + for (i = 0; i != 4; i++) { + s = (maillon*) malloc(sizeof(maillon)); + if (!s) { + printf("Erreur d'allocation mémoire. (2) \n"); + } + s->x = (rand() % 50) - 25; + s->y = (rand() % 50) - 25; + p->suivant = s; + p = s; + } + return premier; +} + +maillon* supprime_coord_negatives(maillon* liste) { + maillon* p; + maillon* premier = liste; + maillon* precedent = liste; + for (p = liste; p != NULL; p = p->suivant) { + if ((p->x) < 0.0 && (p->y) < 0.0) { + p = precedent; + p->suivant = p->suivant->suivant; + precedent = p; + p = p->suivant; + } + else { + precedent = p; + } + } + return premier; +} + +int main(void) { + maillon* liste = creation_liste(); + afficher_liste(liste); + afficher_liste(supprime_coord_negatives(liste)); + return EXIT_SUCCESS; +} diff --git a/DEV1.1/CM2/moyenne.c b/DEV1.1/CM2/moyenne.c new file mode 100644 index 0000000..1d969c7 --- /dev/null +++ b/DEV1.1/CM2/moyenne.c @@ -0,0 +1,8 @@ +double moyenne(int* t, int len) { + int i; + int somme = 0; + for (i = 0; i != len; i++) { + somme += t[i]; + } + return somme/len; +} diff --git a/DEV1.1/CM2/moyenne.h b/DEV1.1/CM2/moyenne.h new file mode 100644 index 0000000..2afa361 --- /dev/null +++ b/DEV1.1/CM2/moyenne.h @@ -0,0 +1,6 @@ +#ifndef MOYENNE +#define MOYENNE + +double moyenne(int* t, int len); + +#endif \ No newline at end of file diff --git a/DEV1.1/CM2/moyenne_main.c b/DEV1.1/CM2/moyenne_main.c new file mode 100644 index 0000000..44b0626 --- /dev/null +++ b/DEV1.1/CM2/moyenne_main.c @@ -0,0 +1,14 @@ +# include +# include +# include "moyenne.h" + +int main(int argc, char** argv) { + int i; + int* t = malloc(sizeof(int)*argc); + for (i = 0; i != argc-1; i++) { + t[i] = (int) strtol(argv[i+1], NULL, 10); + } + printf("Moyenne : %.2f\n", moyenne(t, argc-1)); + free(t); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/CM2/toto.c b/DEV1.1/CM2/toto.c new file mode 100644 index 0000000..3b6a8ba --- /dev/null +++ b/DEV1.1/CM2/toto.c @@ -0,0 +1,6 @@ +# include + +int main(void) { + printf("Hello world\n"); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/Entrainements/controle_machine_2_A/reitne b/DEV1.1/Entrainements/controle_machine_2_A/reitne new file mode 100644 index 0000000000000000000000000000000000000000..6cf817081d6f3cb041f0255654beab36e441433f GIT binary patch literal 4 LcmZP&y4DT=0&M|s literal 0 HcmV?d00001 diff --git a/DEV1.1/Entrainements/controle_machine_2_B/Makefile b/DEV1.1/Entrainements/controle_machine_2_B/Makefile index 26976a9..0a4cc35 100644 --- a/DEV1.1/Entrainements/controle_machine_2_B/Makefile +++ b/DEV1.1/Entrainements/controle_machine_2_B/Makefile @@ -1,11 +1,27 @@ -carre: carre.o hue.o - gcc -ansi -pedantic -o carre carre.o hue.o - +CC = gcc +CFLAGS = -ansi \ + -pedantic +EXE = but +OFILES = carre.o \ + hue.o + +### BUT PAR DEFAUT ### + +but : ${EXE} + +### REGLES ESSENTIELLES ### + carre.o : carre.c - gcc -ansi -pedantic -c carre.c + +hue.o : hue.h hue.c + +${EXE} : ${OFILES} + $(CC) $(CFLAGS) -o ${EXE} ${OFILES} -hue.o : hue.c hue.h - gcc -ansi -pedantic -c hue.c +### REGLES OPTIONNELLES ### + +run : but + ./${EXE} -run : carre - ./carre +clean : + -rm -f ${OFILES} ${EXE} \ No newline at end of file diff --git a/DEV1.1/Entrainements/controle_machine_2_B/but b/DEV1.1/Entrainements/controle_machine_2_B/but new file mode 100755 index 0000000000000000000000000000000000000000..1559aa3843d227b4805deea0a801ab47d6d166d3 GIT binary patch literal 15688 zcmeHOYit}>6~4P}YPX3WNt4EjX}qEhN`ky`9NTgUChPc-b>%#o+JQE-(~Wm+udvtd z?m9RT1y`nsRfs5UMXNqU^8+EuLzIUU3IZoasnZ8_R3Rl25+-WZHGz_p00{&y-?{gk z@$9gH3M7QYoMh(Q^PThEd*{sT>>bb9&$M@S_ zxBdmsQ?&T)@d8AK1oYn4^%MXR?c`BzW@@xs%{1rh0UmFJweZL!-YoNGnP+PrZ zlX5~^6X(;dL-3J=^j;}9Z;W|v-Nx~vX$+FP-bzRRo$+=vuPvavQEpvtU?p0{yAwRh z%X<|$&3kyfYn_K$&cA3*tJ*ji-``ljaWGml7*C9j)r>VY)-=`!Q^UbJJq4OqEjGHQ zw(smw{&6))nDBkdmuLIgMu--QU5<^?PW-cK>!U}1y>DIRO{t638~(ia+lzPILosw5 z)F;J|5JsB_`D7F9z39aVT2>(N9$dctWL;kwg@D?^wj@izgz3@k22+ zl8h(PeTrh~v^T2lU7g!nt-4@cu)%I`u2)uP_YNx>OUC-+sdOyay`yz-I1%fP>>s3| z`iF)SJd|ZZ3kG7=xI%C>&_B|qP3P9HZiiQ{=h4;i8|bQOW$gQ3`Z7}ISG!=7$bCjW z-y=&6eunQOf(IC{4H>`SVoz>0IGqKLl1qqoZ z-NyNrq=6C#?!5jh95{UzMJhw4Mg8zsf(8N({6-Vv?Y#_m8SpaTWx&gTmjN#W|5q9K zL;0G&geQJm5_(r9|4^O83xtZ|9&q}6r9&!yY1J12|75nn)5L#ppkZ*1_2U&Z9 zY+54D&1m~YvT12JH>vIKl1)pwx$kKEd9rBMBhB-O$*rhD_@%yJdG%*uVuDAS9|96Svgi=0+b^eAVCwThGxZy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f!MeKfpZE_fwEVsB^Jx%oeWgXS;%wt$HgP48Zu;^v=%)5#wTm}t>Ic9PMS^C$2d zXp~{&kFEVXCi&f-J6>$jzXF%mgu<8SlQT5{Arfb-1zYg*aL~0Qd|6l8zr&=1gV6O) zB0M>dv>u`m;mhx*CO1+v-g_Bk?}ab=3Or7}Jl|xQAF`RIAw1E3kez&4->s`P@iI^8 zMtHUjGGQ`*Sw}T7-yKh5Ii-}x=WyF4eD~*1_)aa?o=ryMW87huopc|jb0G7P`zJj= g$lTGiCA8TzACQ6A<1(?9EzEy`FZ`Qb1edA)4hkM)sQ>@~ literal 0 HcmV?d00001 diff --git a/DEV1.1/Entrainements/controle_machine_2_B/hue.c b/DEV1.1/Entrainements/controle_machine_2_B/hue.c index 4504ca2..94d29df 100644 --- a/DEV1.1/Entrainements/controle_machine_2_B/hue.c +++ b/DEV1.1/Entrainements/controle_machine_2_B/hue.c @@ -1,4 +1,6 @@ -#include "carre.c" +#define RED 1 +#define GREEN 2 +#define BLUE 4 int hue(void) { int choice = rand()%3; diff --git a/DEV1.1/TP28/test.c b/DEV1.1/TP28/test.c index fb496e2..3ff192d 100644 --- a/DEV1.1/TP28/test.c +++ b/DEV1.1/TP28/test.c @@ -1,13 +1,21 @@ # include # include -int f(int n) { - if (n>100) - return n-10; - else - return f(f(n+11)); +void sierpinski(unsigned int n) { + if (n == 0) { + DessinerSegment(100,800,800,800); + DessinerSegment(450,100,100,800); + DessinerSegment(450,100,800,800); + } + /* TODO */ } -int main(void) { - f(12); +int main(int argc, char** argv) { + InitialiserGraphique(); + CreerFenetre(200, 200, 900, 900); + sierpinski((int) strtol(argv[1], NULL, 10)); + while (1) { + /* Infini */ + } + return EXIT_SUCCESS; } \ No newline at end of file diff --git a/DEV1.1/TP29/TP29_reponses.txt b/DEV1.1/TP29/TP29_reponses.txt new file mode 100644 index 0000000..d3b2795 --- /dev/null +++ b/DEV1.1/TP29/TP29_reponses.txt @@ -0,0 +1,4 @@ +----- TP29 : Piles ----- + +1. + diff --git a/DEV1.1/TP29/test.c b/DEV1.1/TP29/test.c new file mode 100644 index 0000000..c873bca --- /dev/null +++ b/DEV1.1/TP29/test.c @@ -0,0 +1,50 @@ +# include +# include + +struct maillon_s { + char valeur; + struct maillon_s* suivant; +}; + +typedef struct maillon_s pile; + + +void push(pile* p, char c) { + pile* s = p; + s = (pile*) malloc(sizeof(pile)); + p->valeur = c; + p->suivant = s; +} + +int empty(pile* p) { + return (p == NULL); +} + + +char pop(pile* p) { + if (!empty) { + pile* s = p; + free(p); + return s->valeur; + } +} + + +void affiche_pile(pile* p) { + pile* s; + for (s = p; s->suivant != NULL; s = s->suivant) { + printf("| %c |\n", s->valeur); + } + printf("-----\n"); +} + +int main(void) { + pile* p; + push(p, 'A'); + affiche_pile(p); + push(p, 'B'); + affiche_pile(p); + push(p, 'C'); + affiche_pile(p); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/TP30/TP30_reponses.txt b/DEV1.1/TP30/TP30_reponses.txt new file mode 100644 index 0000000..0a63f9e --- /dev/null +++ b/DEV1.1/TP30/TP30_reponses.txt @@ -0,0 +1,4 @@ +----- TP30 : Files ----- + +1. + diff --git a/DEV1.1/TP30/test.c b/DEV1.1/TP30/test.c new file mode 100644 index 0000000..feaa792 --- /dev/null +++ b/DEV1.1/TP30/test.c @@ -0,0 +1,153 @@ +# include +# include +# include + +typedef struct { + char valeurs[100]; + int debut; + int fin; + size_t taille; +} file; + +void initialise_file(file* f) { + f->debut = 0; + f->fin = 0; + f->taille = 0; +} + +int empty(file* f) { + return (f->taille == 0); +} + +void enqueue(file* f, char c) { + f->valeurs[f->fin] = c; + f->fin++; + f->taille++; +} + +char dequeue(file* f) { + if (empty(f)) { + printf("Erreur : La file est vide.\n"); + return; + } + f->debut++; + f->taille--; + return f->valeurs[f->debut-1]; +} + + +void affiche_file(file* f) { + int i; + if (f->taille == 0) { + printf("File vide.\n"); + return; + } + printf("<------------\n"); + for (i = f->debut; i != f->fin; i++) { + if (i == 100) { + i = 0; + } + printf("%c ",f->valeurs[i]); + } + putchar('\n'); +} + +char first(file* f) { + return f->valeurs[f->debut]; +} + +void clear(file* f) { + while (!empty(f)) { + dequeue(f); + } +} + +void affiche_couleurs(void) { + ChoisirCouleurDessin(CouleurParComposante(16,217,62)); /* Green */ + RemplirRectangle(0,0,400,400); + ChoisirCouleurDessin(CouleurParComposante(245,14,14)); /* Red */ + RemplirRectangle(400,0,400,400); + ChoisirCouleurDessin(CouleurParComposante(221,220,28)); /* Yellow */ + RemplirRectangle(0,400,400,400); + ChoisirCouleurDessin(CouleurParComposante(28,95,221)); /* Blue */ + RemplirRectangle(400,400,400,400); +} + +void choisit_couleur_aleatoire(file* f) { + /* Met en valeur une couleur graphiquement et stocke la + couleur dans la file avec l'initiale de la couleur */ + int x,y; + unsigned long ms = Microsecondes(); + unsigned long cycle = 1000000L; + while (ms + cycle < Microsecondes()) + srand(time(NULL)); + x = rand() % 800; + y = rand() % 800; + if (x < 400 && y < 400) { + enqueue(f, 'G'); + ChoisirCouleurDessin(CouleurParNom("green")); + RemplirRectangle(0,0,400,400); + } + else if (x > 400 && y < 400) { + enqueue(f, 'R'); + ChoisirCouleurDessin(CouleurParNom("red")); + RemplirRectangle(400,0,400,400); + } + else if (x < 400 && y > 400) { + enqueue(f, 'Y'); + ChoisirCouleurDessin(CouleurParNom("yellow")); + RemplirRectangle(0,400,400,400); + } + else if (x > 400 && y > 400) { + enqueue(f, 'B'); + ChoisirCouleurDessin(CouleurParNom("blue")); + RemplirRectangle(400,400,400,400); + } + else { + printf("ERREUR"); + } + ms = Microsecondes() + cycle; + while (Microsecondes() < ms) { + /* Attente 1sec */ + } + affiche_couleurs(); +} + +char choix_utilisateur(void) { + /* TODO */ +} + +int main(void) { + int nb_tours = 1; + file f; + initialise_file(&f); + InitialiserGraphique(); + CreerFenetre(200,100,800,800); + affiche_couleurs(); + while (1) { + choisit_couleur_aleatoire(&f); + affiche_file(&f); + while (empty(f)) { + char couleur; + char choix; + couleur = dequeue(f); + choix = choix_utilisateur(); + } + /* Boucle infinie */ + } + /*affiche_file(f); + enqueue(f, 'A'); + enqueue(f, 'B'); + enqueue(f, 'C'); + affiche_file(f); + dequeue(f); + affiche_file(f); + dequeue(f); + affiche_file(f); + enqueue(f, 'D'); + affiche_file(f); + clear(f); + affiche_file(f);*/ + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/TP31/TP31_reponses.txt b/DEV1.1/TP31/TP31_reponses.txt new file mode 100644 index 0000000..e69de29 diff --git a/DEV1.1/TP31/test.c b/DEV1.1/TP31/test.c new file mode 100644 index 0000000..7c872a0 --- /dev/null +++ b/DEV1.1/TP31/test.c @@ -0,0 +1,61 @@ +#include +#include + +enum wedge { + PITCHING = 1, + GAP = 2, + SAND = 3, + LOP = 4, + FLIP = 5 +}; + +enum putter { + REGULAR = 1, + BELLY = 2, + LONG = 3 +}; + + +typedef struct { + char* marque; + char* modele; + char* categorie; + unsigned int sous_categorie : 4; +} club; + +void affiche_catalogue(int taille_catalogue, club* catalogue) { + int i; + char* wedge[5] = {"Pitching", "Gap", "Sand", "Lop", "Flip"}; + char* putter[3] = {"Regular", "Belly", "Long"}; + printf("| Marque | Modèle | Catégorie | Sous-catégorie |\n"); + printf("------------------------------------------------\n"); + for (i = 0; i != taille_catalogue; i++) { + printf("| %6s | %6s | %9s | %14d |\n", catalogue[i].marque, catalogue[i].modele, catalogue[i].categorie, catalogue[i].sous_categorie); + } +} + +int main(void) { + int i; + club catalogue[10]; + char* marques[4] = {"A", "B", "C", "D"}; + char* modeles[4] = {"M", "N", "O", "P"}; + char* categories[4] = {"Bois", "Fer", "Wedge", "Putter"}; + srand(time(NULL)); + for(i = 0; i != 10; i++) { + catalogue[i].marque = marques[rand() % 4]; + catalogue[i].modele = modeles[rand() % 4]; + catalogue[i].categorie = categories[rand() % 4]; + if (catalogue[i].categorie == "Wedge") { + catalogue[i].sous_categorie = rand() % 5; + } + else if (catalogue[i].categorie == "Putter") { + catalogue[i].sous_categorie = rand() % 3; + } + else { + catalogue[i].sous_categorie = rand() % 9 + 1; + } + } + affiche_catalogue(10, catalogue); + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/commande_grep b/DEV1.1/commande_grep new file mode 100644 index 0000000..d708e24 --- /dev/null +++ b/DEV1.1/commande_grep @@ -0,0 +1 @@ +grep --color -E '[[:digit:]]+(\.[[:digit:]]+)?[[:blank:]]+\*[[:blank:]]+[[:digit:]]+(\.[[:digit:]])+(\.[[:digit:]]*)?' sensors.conf \ No newline at end of file diff --git a/DEV1.1/simoes_CM2.tar.gz b/DEV1.1/simoes_CM2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7603e8a8dc4dde532696b9a015e96d2a3fb07796 GIT binary patch literal 1587 zcmV-32F&>%iwFP!000001MOP%Ixin`Oh_2({ z+v!>z3*T19?wXQbV9B(*)|O#+Z3F41W!u&gIP(^akR_=b11u$cC|EL`k4J%Mu{3La z$kLW&SoR`>n?L%v|EWkt+ne7Uw82}pJ$3)hPPPB0(?veBgN#dH%ul2-e)9ca1s-`} z<}-Mnq&^qzix;42JW65c@<_iF+;6}aZFv+UEznnfV__)Z4-tp{yJ)4+)0SgYN*ux9 z&ECn`@oB$5I6m%a*AKleh5Lc*|G@pk0v@t?%`waV9mlHd-?q2V{%zCfD*Imq`hD1j zbI;TIyZbvYkFnBnqlCjd4N9~|%y*-dd)na502u-vxuJHnySG0e{-L;HQN-G!-lrg* zkrQbP4YbwORruxf1YYgDhF=G}J6J>#HptQ789e@iqhA-CuLmz_aC9Yu!;`(iK2>t| z$$_!o1i>3~)EnCuRf#zAspOpbDz3HV$9lit0DMX{G@vC4iE2!B(T-l7>>V8*jz!bF zkhu{&)0SKD5L&^wUop@_@ATau`>(V#r#WVx|E5{9|1R0TwWZGggWr|VSrKONH|`|oa<%KjIDd)vQOSTWjqh(--i1O}gbyrs0T^| zO{)i+P1t9p+~ru(BiYUB8$LzYBRio$hugjFl9e^f~}LR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