自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

~★sunshine☆的博客专栏

也曾对自己说 NEVER GIVE UP..但有时候也怀疑坚持的对还是错。。

  • 博客(27)
  • 资源 (1)
  • 收藏
  • 关注

原创 51nod--1770数数字

为该问题添加一个话题 隐藏话题1770 数数字基准时间限制:1 秒 空间限制:262144 KB 分值: 20 难度:3级算法题 收藏 关注统计一下 个 的结果里面有多少个数字d,a,b,d均为一位数。样例解释:3333333333*3=9999999999,里面有10个9。

2017-01-30 15:26:22 370

原创 【Java】切换标点符号

public class Test{ public static void main(String[] args){ System.out.println("请输入你要提交的java文件名称:"); Scanner input=new Scanner(System.in); String filename=input.next(); StringBuffer file=new S

2017-01-26 18:50:20 601

原创 【Java】替换-删除-反转字符串

1.替换字符StringBuffer 对象,setCharAt(int index,char ch)       修改位置为index的字符为chStringBuffer sb=new StringBuffer("hello");sb.setCharAt(1,'E');System.out.println(sb);  //输出hEllo2.删除字符串deleteCharAt

2017-01-26 17:47:43 321

原创 【Java】StringBuffer的append()对字符串追加

public class Test{ public static void main(String[] args){ StringBuffer sys=new StringBuffer("校内课程管理"); System.out.println("欢迎进入《"+sys+"》系统"); StringBuffer coursename=new StringBuffer(); Syst

2017-01-26 17:20:44 8575

原创 【Java】创建StringBuffer()类--可变字符串

public StringBuffer():构造一个空的字符串缓冲区。并且初始化为16个字符的容量,public StringBuffer(int length)长度为length的容量public StringBuffer(String str)初始幻化为指定的字符串内容str,初始容量为16加上str的长度public class Test{ public static void

2017-01-26 15:55:01 1269

原创 【Java】批量替换字符串

public class Test{ public static void main(String[] args){ //定义介绍java的文本 String into="java是由Sun Microsystems公司于1995年5月推出的" +"java程序设计语言和java屏台的总称。" +"用java实现的Hotjava浏览器(支持java applet)显示了java的

2017-01-26 12:29:16 3384

原创 【Java】字符串替换replace

1.使用replace()public class Test{ public static void main(String[] args){ String words="hello java,hello,php"; System.out.println("源字符串是:"+words); System.out.println("replace(\"l\",\"D\")结果:"+w

2017-01-26 11:46:19 476

原创 51nod-1632B君的连通

1632 B君的连通基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 收藏 关注B国拥有n个城市,其交通系统呈树状结构,即任意两个城市存在且仅存在一条交通线将其连接。A国是B国的敌国企图秘密发射导弹打击B国的交通线,现假设每条交通线都有50%的概率被炸毁,B国希望知道在被炸毁之后,剩下联通块的个数的期

2017-01-25 16:04:53 410

原创 51nod-【codeforce】A. Vasya and Petya's Game

A. Vasya and Petya's Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya and Petya are playing a simple game. V

2017-01-24 15:42:44 355

原创 java-验证文件名和邮箱地址(字符串查找)

package 字符串;import java.util.*;public class Test{ public static void main(String[] args){ boolean filecon=false;//判断文件名是否合法 boolean emailcon=false;//判断邮箱地址是否合法 System.out.println("***********

2017-01-24 12:14:09 1575

原创 java-字符串查找

使用indexOf()查找:str.indexOf(要查找的字符串,int 查找的起始位置)code:public class first{ public static void main(String[] args){ String words="today,monday,sunday"; System.out.println("源字符串是:"+words); System

2017-01-24 11:10:17 413

原创 ***【杭电6012】Lotus and Horticulture

Lotus and Horticulture    Accepts: 91    Submissions: 641 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)问题描述这几天Lotus对培养盆栽很感兴趣,于是她想搭建一个温

2017-01-22 15:23:09 392

原创 【杭电6011】BC-Lotus and Characters

sort +结构体

2017-01-21 20:39:44 235

原创 玲珑-动态规划

1032 - A-BTime Limit:1s Memory Limit:128MByteSubmissions:684Solved:127DESCRIPTION你有nn个球,需要把他们放到mm个盒子里。要求拥有最多球的盒子唯一,问方案数。INPUT一行两个数n,mn,m.(n,m≤500n,m≤500)

2017-01-21 18:55:58 277

原创 java-字符串比较

public class first{ public static void main(String[] args){ //字符串比较equals() String sys="学生信息管理"; System.out.println("欢迎进入《"+sys+"》系统"); System.out.println("请设置一个管理员密码:"); Scanner input=new

2017-01-21 12:28:40 258

原创 java-截取新闻标题substring

public class first{ public static void main(String[] args){ //实现截取新闻标题 String[] news=new String[]{"Java JDK 最新版本推出","如何快速成为java高手","学习java的忠告","职场男女必须知道的那些二三事","java面试题大全","本年度最佳华语男歌手排行榜"}; //定

2017-01-21 12:08:47 385

转载 ***玲珑1072- Capture

1072 - CaptureTime Limit:15s Memory Limit:1024MByteSubmissions:539Solved:178DESCRIPTIONIn a city capture game, Mr. Van owns a Empire with a capital city ( marked 1 ). Initi

2017-01-20 16:59:03 169

转载 set集合容器用法

set集合容器:实现了红黑树的平衡二叉检索树的数据结构,插入元素时,它会自动调整二叉树的排列,把元素放到适当的位置,以保证每个子树根节点键值大于左子树所有节点的键值,小于右子树所有节点的键值;另外,还得保证根节点左子树的高度与右子树高度相等。平衡二叉检索树使用中序遍历算法,检索效率高于vector、deque和list等容器,另外使用中序遍历可将键值按照从小到大遍历出来。构造set集合主要

2017-01-20 14:48:26 271

转载 vector的用法

1 基本操作(1)头文件#include.(2)创建vector对象,vector vec;(3)尾部插入数字:vec.push_back(a);(4)使用下标访问元素,cout(5)使用迭代器访问元素.vectorint>::iterator it;for(it=vec.begin();it!=vec.end();it++) cout

2017-01-20 14:34:39 209

原创 玲珑Round #7-1071 - Boring Game

1071 - Boring GameTime Limit:1s Memory Limit:1024MByteSubmissions:612Solved:200DESCRIPTIONIn a mysterious cave, PigVan ( Mr.Van's pet ) has lived for thousands years. PigVa

2017-01-20 12:43:14 252

原创 字符串提取

public class first{ public static void main(String[] args){ //字符串的提取substring(int beginIndex) //提取字符串开始的位置 String str="窗内网是学习的好网站好教学网站"; String result=str.substring(7); String result1=str.s

2017-01-19 18:28:27 222

原创 字符串分割

package calende;public class first{ public static void main(String[] args){ //字符串的分割:str.split(String sign,int limit) //sign为指定分割符,limit为生成字符串个数 String colors="red,black,white,yellow,blue"; St

2017-01-19 17:32:06 147

原创 多重部分和问题

有n个不同大小的数字a[i],每种m[i]个,是否存在若干个和恰为k  p63#includeint main(){ int n,k; int a[1000],m[1000];//值 个数 bool dp[1000+1][1000+1]; dp[0][0]=true; scanf("%d",&n); for(int i=0;i<n;i++) scanf("%d",&a[i])

2017-01-18 17:57:11 290

原创 630C-

The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers.Lucky number is a number that consists of digits 7 and8 only. Find the maximum number of offices

2017-01-16 18:57:02 223

原创 学生信息管理系统

package calende;import java.util.Scanner;public class first { public static void main(String[] args){ String sys="学生信息管理"; System.out.println("欢迎进入《"+sys+"》系统"); System.out.println("请设置一个管理员密

2017-01-16 16:34:32 623

原创 630A

The HR manager was disappointed again. The last applicant failed the interview the same way as 24 previous ones. "Do I give such a hard task?" — the HR manager thought. "Just raise number5 to the po

2017-01-16 10:59:30 296

原创 630B 快速幂

The city administration of IT City decided to fix up a symbol of scientific and technical progress in the city's main square, namely an indicator board that shows the effect of Moore's law in real tim

2017-01-16 10:22:06 213

设计素材degine

设计素材网址集合(ui设计,电商,前端页面等资源)网页

2018-05-27

空空如也

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

TA关注的人

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