自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 按出现频率高低输出字母,给出字典序列

按出现频率高低输出字母,给出字典序列 使用一个数组num存储每个字母出现的次数,随后遍历26次num数组,每次寻找当前数组中最大数,根据数组下标key得到字母,根据num[key]的值得到原串中出现的次数,结果存入res字符串。每次结束后,将num[key]置零 T(n)=O(n)+O(26*T(26))=O(n)+O(1)=O(n) S(n)=O(1) import java.util.Scanner; public class tongjipaixu { public static

2021-03-24 23:29:06 402

原创 WOJ1062

Long time ago, people used to believe that they live on 2D world and if they will travel long enough in one direction, they will fall down over the edge. Even when it was proved that the Earth is rounded some of them were still afraid to travel to sout.

2021-01-02 20:51:52 190

原创 woj1264

#include<stdio.h> #include<stdlib.h> int MM1[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; int MM2[12] = { 31,29,31,30,31,30,31,31,30,31,30,31 }; int n; int getY() { int year=2000; while (n >= 0) { if ((year % 4 == 0 &a...

2021-01-02 13:55:28 131

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除