<span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">1、名字的漂亮度</span>
代码:
<pre name="code" class="cpp">
#include<stdio.h>
/*
* 对数组a 进行排序
*/
void sort(int a[], int n)
{
int i, j, temp;
for( i = 0; i < n; i++)
for(j = i; j < n ; j++)
{
if(a[i] < a[j])
{
temp = a[i];
a[i] = a[j];
a[j] = temp;
}
}
}
int main(void)
{
int n; /* 名字个数 */
scanf("%d",&n);
while(n--)
{
char str[100];
int a[26]={0}, /* 名字中每个字符的个数组成的数组 */
i = 0,
re