hdoj 1219 AC Me

杭电OJ 1720. A+B Coming 题目描述: Problem Description Many classmates said to me that A+B is must needs. If you can’t AC this problem, you would invite me for night meal. ^_^ Input Input may contain multiple test cases. ... 阅读详情


http://acm.hdu.edu.cn/showproblem.php?pid=1219

AC Me

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 11835    Accepted Submission(s): 5270


Problem Description
Ignatius is doing his homework now. The teacher gives him some articles and asks him to tell how many times each letter appears.

It's really easy, isn't it? So come on and AC ME.
 


Input
Each article consists of just one line, and all the letters are in lowercase. You just have to count the number of each letter, so do not pay attention to other characters. The length of article is at most 100000. Process to the end of file.

Note: the problem has multi-cases, and you may use "while(gets(buf)){...}" to process to the end of file.
 


Output
For each article, you have to tell how many times each letter appears. The output format is like "X:N".

Output a blank line after each test case. More details in sample output.
 


Sample Input
  
hello, this is my first acm contest! work hard for hdu acm.
 


Sample Output
  
a:1 b:0 c:2 d:0 e:2 f:1 g:0 h:2 i:3 j:0 k:0 l:2 m:2 n:1 o:2 p:0 q:0 r:1 s:4 t:4 u:0 v:0 w:0 x:0 y:1 z:0 a:2 b:0 c:1 d:2 e:0 f:1 g:0 h:2 i:0 j:0 k:1 l:0 m:1 n:0 o:2 p:0 q:0 r:3 s:0 t:0 u:1 v:0 w:1 x:0 y:0 z:0
#include<stdio.h>
#include<string.h>
char s[100010];
int main()
{
	char a[]="abcdefghijklmnopqrstuvwxyz";
	int b[30],i,j,k,n;
	while(gets(s)!=NULL)
	{
		memset(b,0,sizeof(b));
		n=strlen(s);
		for(i=0;i<n;i++)
		{
			for(j=0;j<26;j++)
			if(s[i]==a[j])
			{
				b[j]+=1;
				break;
			}
		}
		for(i=0;i<26;i++)
		{
			printf("%c:%d\n",a[i],b[i]);
		}
		printf("\n");
	}
	return 0;
}

CoppeliaSim(原V-REP)新手上路 CoppeliaSim(原V-REP)是一个机器人仿真平台,里面有很多来自别的公司的机器人模型以及完备的物理引擎,我们可以通过python,c++,matlab等语言控制里面的机器人。,您也可以在官网中Downloads里找您需要的版本,一般只需要下载EDU版本就可以了,我下载的是v4.1.0 windows EDU版本。在版本V4之前,CoppeliaSim叫V-REP,在官网可以下载到之前的V-REP版本。 阅读详情

相关推荐

pagerank算法详解

目录一、pagerank定义两个重要假设二、pagerank算法公式定义计算演示矩阵化计算三、存在的两个问题问题1.Dead Ends问题2.Spider Traps 一、pagerank定义 入链数:指向该节点的链接数 出链数:由该节点指出的链接数 以上图为例:A的入链数为1,出链数为3,所以将由A指向其他节点的边权重设置为1/3,表示A访问B、C、D节点的概率均为1/3 两个重要假设 数量假设:在Web图模型中,如果一个页面节点接收到的其他网页指向的入链数量越多,那么这个页面越重要。 质量假设:指向

gary101818的博客 4万+

【HDU】1219 AC Me

   Problem DescriptionIgnatius is doing his homework now. The teacher gives him some articles and asks him to tell how many times each letter appears.It's really easy, isn't it? So come on and AC ME.I...

biongbiongdou的博客 338

DySAT+: Enhancing Dynamic Graph Representation Learning with Multi-Head Self-Attention and Temporal-

本文深入探讨了DySAT+模型在动态图表示学习中的创新应用,通过多头时空注意力机制和层级信息融合策略,有效解决了动态图数据中的时间维度信息捕捉和结构演变动态适应问题。该模型在社交网络异常检测和金融交易网络分析等场景中表现出色,显著提升了预测准确率和响应速度。

weixin_29035405的博客 344

D - AC Me

Ignatius is doing his homework now. The teacher gives him some articles and asks him to tell how many times each letter appears. It’s really easy, isn’t it? So come on and AC ME. Input Each article...

AVICIIl的博客 305

从Peer到脉冲地震波:免费Python工具全流程配置教程(PyCharm+Anaconda)

本文详细介绍了如何使用Python工具链(PyCharm+Anaconda)实现从Peer数据库获取地震波数据到生成脉冲地震波的全流程配置。通过开源工具EQTOOL和PySeismicGen,结合Python环境搭建、数据格式转换和脉冲地震动生成技术,为结构抗震分析提供高效、灵活的解决方案。

weixin_29093169的博客 434

深度强化学习算法PPO训练Pendulum

returnadv = 0print('状态空间维度:', state_n)print('动作空间维度:', action_n)steps = []if done:breakif done:breakelse:steps = []if done:break。

weixin_43336108的博客 815

hdu 1219 AC Me (java版本)

AC MeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 18428 Accepted Submission(s): 7805Problem Description Ignatius is doing his homework n

功不成身已退的博客 514

【Qwen2微调实战】LLaMA-Factory框架对Qwen2-7B模型的微调实践

在人工智能的浪潮中,大型语言模型(LLMs)正逐渐成为研究和应用的热点。它们在自然语言处理(NLP)的各个领域,如文本生成、翻译、问答等任务中展现出了卓越的能力。Qwen2-7B模型,作为该领域的佼佼者,不仅因其庞大的参数量和强大的表示能力受到关注,更因其在微调后能够更好地适应特定任务而备受关注。本文将详细介绍如何利用LLaMA-Factory这一高效的微调框架对Qwen2-7B进行微调,以期达到提升模型在特定任务上的表现。

寻道AI,探索AI无限可能! 2万+

AC Me解题报告

题目摘要:Ignatius is doing his homework now.The teacher gives him some articles and asks him to tell how many times eachletter appears. It's really easy, isn't it? So come on and AC ME. 题目大意:写一串字符,算出其中每

卫少的专栏 956

【WRF-Urban数据集】中国60个城市的1 km分辨率城市冠层参数(UCPs)

中国60个城市的1 km分辨率城市冠层参数(UCPs)

WW、forever的博客 1074

VMware使用Windows、WinXP等虚拟机上不了网的解决办法(管用)

这个情况一般出现在可以插网线的电脑上,比如台式机和有网线插口的笔记本。需要转换器才能插网线的笔记本一般不会出现这种情况. 查看主机的IP地址和虚拟机的IP地址是否在同一网段,如果在的话,虚拟机就能上网了!!(备注:虚拟机中的IP地址一定要和主机中的用来上网的那个连接的IP地址相同哦)。

爱吃雪糕的小布丁的博客 1万+

A+B Coming

Description Many classmates said to me that A+B is must needs.  If you can’t AC this problem, you would invite me for night meal. ^_^    Input Input may contain multiple test cases.

dawnty_的博客 310

uniapp 如何封装实现任意页面都能使用的全局弹窗

项目内容场景全局监听消息提示难点uniapp 无法全局挂载组件解决方案动态创建 DOM + 动态 Vue 实例优势跨页面 / 不依赖页面组件树 / 灵活调用如果你使用的是小程序平台,DOM 操作可能受限,需要用或方式兼容处理。想支持多个弹窗堆叠?你可以扩展,加个弹窗队列管理器。

代码简单说 Vue、JAVA、PHP、Node.js 熟练运用,接口、架构、性能全搞定。 955

HDOJ1219 AC Me

AC Me Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 19712    Accepted Submission(s): 8288 Problem Description Ignatius is doing his h

BarryLee的博客 282

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

InTheHand.Net.Personal+BlueTooth4,蓝牙开发

项目中有蓝牙开发的必备dll,现在网上相关的文档博客不少,有的说的多有的说少,但是却很少有这两个dll,分享一下。

HDOJ 1219 AC Me(有问题!)

【思路】:只要不用switch就可以。 【注意】:本题在for循环中采用如下方式会TLEfor (i = 0; i 采用这种则AC for (i = 0; str[i] != '\0'; i++) 【TLE代码】: #include #include #include using namespace std; #define MAX 100000+1 int main()

WJ的专栏 780

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

HDOJ 1219 AC ME

AC Me Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9785    Accepted Submission(s): 4367 Problem Description Ignatius is doing hi

哇咔咔的升级之路~ 716

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

AC Me hdoj 1219

AC Me Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11839    Accepted Submission(s): 5272 Problem Description Ignatius is doi

亿念之茶的专栏 407

hdoj--AC Me 1219

每篇文章仅由一行组成,所有字母均为小写。你只需要数一数每个字母的个数,所以不要注意其他字符。文章长度最多为100000。注意:问题有多种情况,您可以使用“while(gets(buf)){...}”处理到文件末尾。伊格内修斯现在正在做功课。老师给了他一些文章,让他说出每个字母出现了多少次。对于每篇文章,你必须告诉每个字母出现了多少次。输出格式类似于“X:N”。在每个测试用例后输出一个空行。示例输出中的更多详细信息。这真的很容易,不是吗?所以来吧,AC ME。

无聊人的博客 74

hdoj 1219 AC Me (超时请进)

思路:TLE见代码; 代码如下: #include #include #include #include #include #include #include using namespace std; int main() { char a[100010]; int sum[26]; int i; char x; int l; while(gets(a)) {

摆渡人的博客 289

hdoj.1219 AC Me 20140815

AC Me Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11913    Accepted Submission(s): 5310 Problem Description Ignatius is doing his

>>--» 唯n1.情缘«--<< 369

【水题】hdoj1219 AC me

又是一道题水我更水敢问谁最水的题 一个我过了很多遍愣是不看题意人家用gets我偏要用getline和stringstream装13的题 用getline和stringstream不知道怎么回事数据一直叠加。也是服气 果然gets一遍AC 不说了特写一篇对自己不看题昏昏沉沉一个劲乱写表示服气 【题目】 AC Me Time Limit: 2000/1000 MS

成长中的小码农 306

Hdu 1219 AC Me

AC MeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18543    Accepted Submission(s): 7836Problem DescriptionIgnatius is doing his homework now....

你身后的人 189

HDOJ, 杭电1219, ACme简单字符串题

字符串系列题目,明天继续刷,将要用到字典树。 需要先学习一下。 水题代码如下: /***** HDOJ 1219 ACme简单字符串题 ********/ /******** written by C_Shit_Hu ************/ ////////////////简单字符串题目/////////////// /************************

[&] () {} 1735

hdu 1219(1.2.8)

题目描述:AC Me Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3515 Accepted Submission(s): 1235   Problem Description Ignati

阿歇的专栏 846

杭电ACM 1219 AC Me

AC Me Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7684    Accepted Submission(s): 3460 Problem Description Ignatius is doin

neuxxm的专栏 1627

ACMSTEP 1.2.8 AC me! //水题 模拟题

AC Me Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 883 Accepted Submission(s): 368

天道酬勤 644
上一篇: hdoj 1412 {A} + {B}
下一篇: hdoj 1248 寒冰王座
SimonCoder
博客等级 码龄13年 1413粉丝 231原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址