#include <stdio.h>
#include <string.h>
void coloca(char nomes[][100], char *frase, int *tam);
void ordena(char nomes[][100], int tam);
int main(int argc, char** argv)
{
char nomes[100][100], frase[2501];
int tam, i, teste;
while(teste--)
{
tam = 0;
coloca(nomes, frase, &tam);
ordena(nomes, tam);
for(i = 1; i < tam; i++)
{
}
}
return 0;
}
void coloca(char nomes[][100], char *frase, int *tam)
{
char *ptr
= strtok(frase
, " "); while(ptr != NULL)
{
}
}
void ordena(char nomes[][100], int tam)
{
int i, j, max;
char aux[100];
for(i = 0; i < tam-1; i++)
{
max=i;
for(j = i + 1; j < tam; j++)
{
max=j;
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCnZvaWQgY29sb2NhKGNoYXIgbm9tZXNbXVsxMDBdLCBjaGFyICpmcmFzZSwgaW50ICp0YW0pOwp2b2lkIG9yZGVuYShjaGFyIG5vbWVzW11bMTAwXSwgaW50IHRhbSk7CmludCBtYWluKGludCBhcmdjLCBjaGFyKiogYXJndikKewogICAgY2hhciBub21lc1sxMDBdWzEwMF0sIGZyYXNlWzI1MDFdOwogICAgaW50IHRhbSwgaSwgdGVzdGU7CiAgICBzY2FuZigiJWQiLCAmdGVzdGUpOwogICAgZ2V0Y2hhcigpOwogICAgd2hpbGUodGVzdGUtLSkKICAgIHsKICAgICAgICB0YW0gPSAwOwogICAgICAgIHNjYW5mKCIlW15cbl0iLCBmcmFzZSk7CiAgICAgICAgY29sb2NhKG5vbWVzLCBmcmFzZSwgJnRhbSk7CgogICAgICAgIG9yZGVuYShub21lcywgdGFtKTsKICAgICAgICBwcmludGYoIlxuXG4lcyIsIG5vbWVzWzBdKTsKICAgICAgICBmb3IoaSA9IDE7IGkgPCB0YW07IGkrKykKICAgICAgICB7CiAgICAgICAgICAgIHByaW50ZigiICVzIiwgbm9tZXNbaV0pOwogICAgICAgIH0KICAgICAgICBwcmludGYoIlxuIik7CiAgICAgICAgZ2V0Y2hhcigpOwogICAgfQogICAgcmV0dXJuIDA7Cn0KCnZvaWQgY29sb2NhKGNoYXIgbm9tZXNbXVsxMDBdLCBjaGFyICpmcmFzZSwgaW50ICp0YW0pCnsKICAgIGNoYXIgKnB0ciA9IHN0cnRvayhmcmFzZSwgIiAiKTsKICAgIHdoaWxlKHB0ciAhPSBOVUxMKQogICAgewogICAgICAgIHN0cmNweShub21lc1soKnRhbSkrK10sIHB0cik7CiAgICAgICAgcHRyID0gc3RydG9rKE5VTEwsICIgIik7CiAgICB9Cn0KCnZvaWQgb3JkZW5hKGNoYXIgbm9tZXNbXVsxMDBdLCBpbnQgdGFtKQp7CiAgICBpbnQgaSwgaiwgbWF4OwogICAgY2hhciBhdXhbMTAwXTsKICAgIGZvcihpID0gMDsgaSA8IHRhbS0xOyBpKyspCiAgICB7CiAgICAgICAgbWF4PWk7CiAgICAgICAgZm9yKGogPSBpICsgMTsgaiA8IHRhbTsgaisrKQogICAgICAgIHsKCgogICAgICAgICAgICBpZihzdHJsZW4obm9tZXNbal0pID4gc3RybGVuKG5vbWVzW21heF0pKQogICAgICAgICAgICAgICAgbWF4PWo7CgogICAgICAgIH0KICAgICAgICBzdHJjcHkoYXV4LCBub21lc1tpXSk7CiAgICAgICAgc3RyY3B5KG5vbWVzW2ldLCBub21lc1ttYXhdKTsKICAgICAgICBzdHJjcHkobm9tZXNbbWF4XSwgYXV4KTsKICAgIH0KfQo=