InscriptionConnexion
STPeach
il y a un an
Jean Jacque Goldman
:GD_easy:
Bon tg
:GD_easy:
il y a un an
:Chat_piment:
il y a un an
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <time.h>
#include <math.h>

void table_rempli(int table[], int N) { // O(N)
for (int i = 0; i <= N; i++) {
table[i] = (rand()%2001) - 1000;
}
}

void afficher(int table[], int N) { // O(N)
for (int i = 0; i < N; i++) {
printf("%d ", table[i]);
}
}

void afficher_val_2(int table[], int N) { // O(N)
if (N > 10) {
for (int i = 0; i < 5; i++) {
printf("%d ", table[i]);
}
printf("\n-------\n");
for (int i = N; i > N - 5; i--) {
printf("%d ", table[i]);
}
} else {
for (int i = 0; i < N; i++) {
printf("%d ", table[i]);
}
}
}

float calcul_note(int table[], int N) { // O(N)
int tmp = 0; // Initialisation de tmp
for (int i = 0; i < N; i++) {
tmp += table[i];
}
float moyenne = tmp / (float) N;
float distzero = fabs(moyenne);

float note = 20.0 * (1 - (distzero / 500.0));
if (note < 0) {
note = 0;
}
return note;
}

float moyenne(int table[], int N) { // O(N)
int tmp = 0; // Initialisation de tmp
for (int i = 0; i < N; i++) {
tmp += table[i];
}
float moyenne = tmp / (float) N;
return moyenne;
}

void trie_insert(int table[], int N) { // O(N^2)
int i, j, tmp;
for (i = 1; i < N; i++) {
tmp = table[i];
for (j = i; j > 0 && table[j - 1] > tmp; j--) {
table[j] = table[j - 1];
}
table[j] = tmp;
}
}

void table_calc_ecart(int table_ecart[], int table[], int N) { // O(N)
for (int i = 0; i <= N; i++) {
table_ecart[i] = abs(table[i] - table[i + 1]);
}
}

void ecart_theori(int table_ecart[], int table[], int N) { // O(N)
int max = 0;
int min = 1001;
float ecart = 2000.0 / N; // Utilisation de 2000.0 pour forcer un calcul en float
int tmp = 0;
float note;

for (int i = 0; i < N; i++) {
if (max <= table_ecart[i]) {
max = table_ecart[i];
}
if (min >= table_ecart[i]) {
min = table_ecart[i];
}
}

tmp = abs(max - ecart) + abs(min - ecart); // On additionne l'écart entre l'écart théorique (float ecart) et l'écart max + l'écart min
printf("Ecart max : %d / Ecart min : %d / Ecart theorique : %.1f / Dispertion : %d", max, min, ecart, tmp);
float distzero = fabs(tmp);

// On rapporte la distance à zéro (ici à la variable ecart) et on fait un produit en croix pour connaître la valeur sur 20
note = 20.0 * (1 - (distzero / 2000.0));
if (note < 0) {
note = 0;
}

printf("\nNote ecart par rapport a ecart theorique : %.1f", note);
}

int main() { // O(R * N^2) où R est le nombre de répétitions et N est la taille du tableau
srand(time(NULL));
int N, rep;
printf("Quelle taille connard ? ");
scanf("%d", &N);
int table[N];
int table_ecart[N-1];

printf("Repete combien de fois ? ");
scanf("%d", &rep);

for (int i = 0; i < rep; i++) {
table_rempli(table, N); // O(N)
printf("\n\nLe tableau : \n");
afficher(table, N); // O(N)
trie_insert(table, N); // O(N^2)
printf("\n\nLe tableau trie :\n");
afficher(table, N); // O(N)
table_calc_ecart(table_ecart, table, N - 1); // O(N)
printf("\n\necart entre les valeurs : \n");
afficher(table_ecart, N - 1); // O(N)

printf("\n\nMoyenne : %.1f\nNote repartition : %.1f\n", moyenne(table, N), calcul_note(table, N)); // O(N) pour chaque appel
ecart_theori(table_ecart, table, N - 1); // O(N)
}
return 0;
}
il y a un an
:Menhera_Music:
:israeldrapeau:
il y a un an
Avec un noir géant d'au moins deux mètres, monté comme un âne. Il baisera ma copine tandis que je serais menotté aux chevilles.

Je hurlerais de rage de me faire cocu, ma copine me supplierait de faire quelque chose, mais impossible, j'aurais les pieds liés.

Puis elle perdra la raison, elle hurlera de plaisir sans aucune retenue. Toutes ses valeurs volent en éclats. Et tout à coup, j'insulterais ce noir, un orgasme de haine.

Ma haine serait tellement immense que je n'aurais plus aucune lucidité pendant au moins quatre heures. Mais le noir l'aura mal pris. Il décidera de rompre le scénario, de me fracasser la gueule et de kidnapper ma copine

Bien sûr, j'aurais un micro vibrant dans l'anus. La police serait immédiatement au courant. Le GIGN irait cueillir le noir à la frontière

Il sera ainsi déchu de sa nationalité française et botté Hors du pays, ça en fera un de moins. Mais ma copine sera nostalgique du gros gourdin qu'elle a connu.

Et je lui proposerais le même plan, qui découlera sur la même conclusion. On aura finalement un partenariat avec le GIGN pour mener la chasse aux noirs.


Et vous votre fantasme ?
:chat_lunettes_cube_cropped:
il y a un an
C:\Users\
bon là c'est mon nom de famille donc je cache
:hap:

\AppData\Roaming\.minecraft\screenshots
NOW YOU BOW TO ME !
You took my dreams BUT NOT MY NAME !!!
il y a un an
:famille-chats-0tout:
:Chat_bof:
:famille-chats-0tout:
il y a un an