uva10851--String暴力
来源:互联网 发布:网络改写的小说 编辑:程序博客网 时间:2024/05/22 17:31
暴力很好写。。我还是太嫩了。。
//#define LOCAL#include <stdio.h>#include <string.h>#include <ctype.h> #include <stdlib.h> #define MAXN 1000010 + 10#define MAX 200 + 10int cmp(const void *_a, const void *_b);char word[MAXN][MAX];int n = 0, len = 0;int main(){#ifdef LOCALfreopen("input.txt", "r", stdin);//freopen("output.txt", "w", stdout);#endifint i;char temp;while(1){// 数据输入 if((temp = getchar()) == EOF)break;if(isalpha(temp))word[n][len++] = tolower(temp);else if(isalpha(word[n][0])){word[n++][len] = '\0';len = 0;} }qsort(word, n, sizeof(word[0]), cmp);for(i = 0; i < n; i++){if(strcmp(word[i], word[i + 1]))printf("%s\n", word[i]);}return 0;}int cmp(const void *_a, const void *_b){char *a = (char *) _a;char *b = (char *) _b;return strcmp(a, b);}
- uva10851--String暴力
- HDU1306 String Matching 【暴力】
- HDOJ-----5311---Hidden String---暴力
- UVa10851 - 2D Hieroglyphs decoder(枚举)
- CodeForces 128B - String 优先队列暴力..
- hdu 4681 String(暴力&dp&LCS)
- HDU 5311 Hidden String (优美的暴力)
- HDU 5310 Hidden String(暴力枚举)
- hdu 5311 Hidden String(dp+暴力dfs)
- hdoj 5311 Hidden String 【KMP + 暴力】
- hdu 4681 String(LIS+暴力)
- csu 1716: Morse string暴力过
- hdu 5944 Fxx and String 暴力(水)
- hdu 5944 Fxx and string【暴力枚举】
- Problem 43 Sub-string divisibility (暴力...)
- hdoj 5311 Hidden String (暴力枚举)
- String字符串的可变性(暴力反射)
- KMP count the string 暴力解法
- web.xml
- Java设计模式-----Command模式 .
- DWR之DWR的web.xml配置
- HTML HELP WORKSHOP使用方法
- Java设计模式-----State模式
- uva10851--String暴力
- Java设计模式-----Proxy模式(静态代理)
- Java设计模式-----Proxy模式(动态代理)
- Java设计模式-----Memento备忘录模式
- Android 子窗口关闭后怎么把数据回传给主窗口
- uses-permission的问题
- Java设计模式-----Mediator中介者模式
- The data couldn’t be read because it has been corrupted
- Java设计模式-----Chain of Responsibility职责链模式