当前位置:网站首页>7-289 tag count (300 points)
7-289 tag count (300 points)
2022-06-13 04:00:00 【Python's path to becoming a God】
#include<stdio.h>
#include<string.h>
int main()
{ void print(char num[100][100],int k);
char a[100000];
char num[100][100];
scanf("%[^\n]",a);
int len=strlen(a);
int k=0;
for(int i=0;i<len;i++)
{
if(a[i]=='#')
{int count=0;
for(int j=i;j<len;j++)
{
if(a[j]!=' ')
{
num[k][count]=a[j];
count++;
}
if(a[j]==' ')
break;
}
k++;
}
}
printf("%d\n",k);
print(num,k);
}
void print(char num[100][100],int k)
{
int b[k];
for(int i=0;i<k;i++)
{
for(int j=0;j<k;j++)
{
if(strcmp(num[i],num[j])==0)
b[i]=b[i]+1;
}
}
for(int i=0;i<k;i++)
{
for(int j=i+1;j<k;j++)
{
if(strcmp(num[i],num[j])==0)
memset(num[j],'\0',sizeof(num[j]));
}
}
for(int i=0;i<k;i++)
{
if(num[i]!=NULL)
printf("%s %d\n",num[i],b[i]);
}
}
边栏推荐
- 谈谈激光雷达的波长
- LVS四層負載均衡集群(3)集群功能分類 - HPC
- SCM: introduction and operation of EEPROM
- GoFrame第五天
- [test development] automated test selenium (II) -- common APIs for webdriver
- [MySQL] index and transaction
- Lambda end operation find and match findany
- 单片机:RS485 通信与 Modbus 协议
- Redis hyperloglog cardinality statistics algorithm
- MCU: RS485 communication and Modbus Protocol
猜你喜欢

Goframe day 5
![[test development] automated test selenium (II) -- common APIs for webdriver](/img/d5/bc38f0bee98b137abc1197c6e03158.png)
[test development] automated test selenium (II) -- common APIs for webdriver
![[interview review] update from time to time for personal use](/img/bf/6a5184815b72e3cb84a66846b6cb49.png)
[interview review] update from time to time for personal use

环评图件制作-数据处理+图件制作
![[test development] use case](/img/33/cb505c9c73eabb9f7734751050e822.png)
[test development] use case

Single chip microcomputer: main index of a/d (analog-to-digital conversion)
![[test development] blog system - LoadRunner performance test (publish blog function benchmark test)](/img/d2/a37257fd7cca1d0a4e748c734a6ffc.png)
[test development] blog system - LoadRunner performance test (publish blog function benchmark test)

MCU: pcf8591 hardware interface

Real time requirements for 5g China Unicom repeater network management protocol

USB-IF BC1.2充电协议解读
随机推荐
[test development] basic concepts related to testing
Single chip microcomputer: main index of a/d (analog-to-digital conversion)
SCM: introduction and operation of EEPROM
Common array methods in JS (map, filter, foreach, reduce)
Lambda终结操作count
EIA map making - data processing + map making
Single chip microcomputer: pcf8591 application program
[zeloengine] localization process /imgui Chinese culture
Example of try catch finally execution sequence
单片机:D/A 输出
Stream流的注意事项
leetcode.1 --- 两数之和
Precautions for stream flow
ROS中的msg消息
Unity Shader 学习 004-Shader 调试 平台差异性 第三方调试工具
Sword finger offer II 022 Entry node of a link in a linked list
Line height equals height why not center
Lambda终结操作reduce归并
Lambda end operation reduce merge
Milliards de données pour déterminer si un élément existe