You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
386 B
29 lines
386 B
15 years ago
|
|
||
|
|
||
14 years ago
|
#include <tqstring.h>
|
||
|
#include <tqstringlist.h>
|
||
15 years ago
|
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
|
||
|
|
||
|
int main(int argc, char **argv) {
|
||
14 years ago
|
TQStringList have;
|
||
15 years ago
|
char buf[1024];
|
||
|
|
||
|
|
||
|
while (!feof(stdin)) {
|
||
|
char *cline = fgets(buf, 1000, stdin);
|
||
|
if (!cline) break;
|
||
13 years ago
|
if (!have.contains(cline)) {
|
||
15 years ago
|
have << cline;
|
||
|
fprintf(stdout, "%s", cline);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
|