12250 - Language Detection
来源:互联网 发布:屏蔽软件弹出广告 编辑:程序博客网 时间:2024/06/07 18:19
In this problem your task ispretty simple. You will be given one of the six words mentioned above or any otherword and you will have to try and detect the language it is from.
Input
Input file contains around 2000 lines of inputs.Each line contains a stringS. You can assume that all the letters ofthe string are uppercase English letters and the maximum length of the stringis14. Input is terminated by a line containing a single ‘#’character (without the quote). This line should not be processed.
Output
For eachline of input except the last one produce one line of output.
This line contains the serialof output followed by a language name. If the input string is“HELLO”or “HOLA”or “HALLO”or “BONJOUR”or “CIAO”or “ZDRAVSTVUJTE”then you should report the language it belongs to. If the input string is somethingother than these 6 strings print the string“UNKNOWN”(without the quotes) instead. All characters in the output strings areuppercase as well. Look at the output for sample input for formatting details.
SampleInput Output for Sample Input
HELLO
HOLA
HALLO
BONJOUR
CIAO
ZDRAVSTVUJTE
#
Case 1: ENGLISH
Case 2: SPANISH
Case 3: GERMAN
Case 4: FRENCH
Case 5: ITALIAN
Case 6: RUSSIAN
#include<stdio.h>#include<string.h>int main(){char a[15];int count=1;while(scanf("%s",a)){if(strcmp(a,"#")==0) break;printf("Case %d: ",count++);if(strcmp(a,"HELLO")==0) puts("ENGLISH");else if(strcmp(a,"HOLA")==0) puts("SPANISH");else if(strcmp(a,"HALLO")==0) puts("GERMAN");else if(strcmp(a,"BONJOUR")==0) puts("FRENCH");else if(strcmp(a,"CIAO")==0) puts("ITALIAN");else if(strcmp(a,"ZDRAVSTVUJTE")==0) puts("RUSSIAN");else puts("UNKNOWN");}return 0;}
- 12250 - Language Detection
- UVa 12250 - Language Detection
- UVa 12250 Language Detection (water ver.)
- Language-Detection语言检测
- A composite approach to language/encoding detection
- 语言检测工具language-detection 的简单使用
- 朴素贝叶斯经典案例:语言识别(language detection)
- detection
- language
- language
- Malware Detection
- Change Detection
- Line Detection
- Blur detection
- Image detection
- face-detection
- collision detection
- Corner detection
- linux下的远程登录总结。。。。。
- IOS-应用之间调用 .
- 读书笔记_卓越程序员密码
- IBatis SqlMap解析及加载
- 分词常见算法-----小整理
- 12250 - Language Detection
- progress--状态交互元素
- fms系列之一 连接服务器
- UVA10881:
- 开源中国iOS客户端学习——(十三)使用UIWebView控件布局视图
- PeekMessage & GetMessage 区别
- UVA 10591 - Happy Number
- [WIKIOI1281] Xn数列
- 关于Cross-Dll问题(在不同的模块之间申请和释放内存)