zoj 2104 Let the Balloon Rise
来源:互联网 发布:云南网络广播电视直播 编辑:程序博客网 时间:2024/04/30 00:34
#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){struct col{char ch[16];int num;struct col *next;} *head,*tail,*p,*q;int n,i,count,max;char str[16];char m[16];while(scanf("%d",&n)&&n){ head = tail = NULL;count = 0;while(n--){scanf("%s",str);max = 0;strcpy(m,str);for(q = head;q!=NULL;q = q->next){if(strcmp(str,q->ch) == 0) q->num++;if(n == 0&&q->num>max) {max = q->num;strcpy(m,q->ch);}}if(q == NULL){ p = (struct col *)malloc(sizeof(struct col));strcpy(p->ch,str);p->num = 0;p->next = NULL;if(head == NULL)head = p;else tail->next = p;tail = p;}} printf("%s\n",m);}return 0;}
0 0
- zoj 2104 Let the Balloon Rise
- ZOJ 2104 Let the Balloon Rise
- ZOJ 2104 Let the Balloon Rise
- ZOJ 2104 Let the Balloon Rise
- zoj 2104 Let the Balloon Rise
- ZOJ 2104Let the Balloon Rise
- ZOJ Problem Set - 2104 Let the Balloon Rise
- ZOj 2104——Let the Balloon Rise
- ZOJ Problem Set - 2104 Let the Balloon Rise
- zoj 2104.Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- TCP/IP详解学习笔记(7)-广播和多播,IGMP协议
- 关于Android SQLite3多线程并发问题,学习笔记。
- ios 自定义Button 不能点击问题
- Yii的URL管理
- wwwwwwwwwwwwww
- zoj 2104 Let the Balloon Rise
- VIM高效率操作 (转载)
- KMP算法Java实现
- fatal: the remote end hung up unexpectedly
- Java开发中的设计模式
- linux下grep命令的使用
- 关于oracle与mysql官方jdbc的一些区别
- FragmentActivity
- Android学习 自定义View