好的,这是一段使用C语言实现随机3v3分组的代码:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define MAX_NAME_LENGTH 20
#define GROUP_SIZE 3
#define TOTAL_PEOPLE 9
struct person {
char name[MAX_NAME_LENGTH];
};
void shuffle(struct person *array, size_t n) {
if (n > 1) {
size_t i;