自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

stven_king的专栏

自信人生两百年、会当击水三千尺

  • 博客(240)
  • 资源 (16)
  • 问答 (2)
  • 收藏
  • 关注

原创 HDOJ  1232    畅通工程

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1232最开始做最小生成树的题,自己不会做,在网上找了一个代码看了一下,感觉思路很清晰,找树的根的个数(联通分支数)K,最后要修的K-1路就是把这些根链接起来形成一个最小生成树#include int bin[1002];int findx(int x){    intr=x;    wh

2015-12-18 18:08:36 470

原创 HDOJ  1022   Train Problem I

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1022#include #include #include #include using namespace std;int main(){    chars2[1010],s1[1010];    intpass[1010];    int n;   while(scanf("

2015-12-18 18:08:33 386

原创 HDOJ 1015   Safecracker

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1015暴力一点还是可以的....#include #include #include #include #include using namespace std;int f(char a,char b,char c,char d,char e){    charaa[5]={a,b,c

2015-12-18 18:08:31 466

原创 HDOJ  1039   Easier Done Than Sa…

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1039只要题目读清楚,1:至少一个元音字母,2:不能有连续三个的元音或辅音字母3:不能有连续相同的两个字母,除(ee,oo)外.......#include #include using namespace std;inline int sew(char c){   if(c=='a'

2015-12-18 18:08:29 345

原创 HDOJ  1020   Encoding

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1020经常WA请进来看看..............就是题目表述有问题:字符算得是相邻的相同的个数eg:如果碰到AABBBCCCABC的话,应该是2A3B3CABC#include #include using namespace std;int main(){    intn,a; 

2015-12-18 18:08:26 501

原创 HDOJ  1061  Rightmost Digit

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1061#includeint main(){   int n, m, unit;   inta[10][4]={{0,0,0,0},{1,1,1,1},{6,2,4,8},{1,3,9,7},{6,4,6,4},{5,5,5,5},{6,6,6,6},{1,7,9,3},{6,8,4,2},{

2015-12-18 18:08:23 666

原创 HDOJ  2069    Coin Change

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2069一个有着五层循环的.....#include int main(){    int n,d[251] = {0};    int c1, c5,c10, c25, c50;    for (n = 0;n        for (c50 = 0; c50 * 50      

2015-12-18 18:08:21 514

原创 HDOJ  2700   Parity

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2700‘e'代表偶校验,使串中’1‘的个数为偶数个’o'代表奇校验,使串中‘1’的个数为奇数个#include #include using namespace std;int main(){    inta,b;    strings;   while(cin>>s&&s!=

2015-12-18 18:08:18 364

原创 HDOJ   2568   前进

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2568#include #include using namespace std;int main(){    intT,n,sum;   cin>>T;   while(T--)    {       sum=0;       cin>>n;       while(n

2015-12-18 18:08:16 281

原创 HDOJ  2567   寻梦

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2562#include #include using namespace std;int main(){    int T;    stringstr1,str2;   cin>>T;   while(T--)    {       cin>>str1>>str2;    

2015-12-18 18:08:13 299

原创 HDOJ  2562   奇偶位互换

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2562#include #include using namespace std;int main(){    int T;    chartemp;    strings;   cin>>T;   while(T--)    {       cin>>s;       

2015-12-18 18:08:10 328

原创 HDOJ   2561   第二小整数

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2561#include #include using namespace std;int main(){    intT,n;   cin>>T;   while(T--)    {       cin>>n;       int a[n];       for(int

2015-12-18 18:08:08 382

原创 HDOJ   2551   竹青遍野

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2551#include #include int main(){    intT,n,i;   scanf("%d",&T);   while(T--)    {       scanf("%d",&n);       for(i=1;i       {         

2015-12-18 18:08:05 463

原创 HDOJ  2550   百步穿杨

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2550#include #include using namespace std;struct shot{    intA,B;    strings;}ca[55];int cmp(const void *a,const void *b){    shotaa=*(const

2015-12-18 18:08:03 274

原创 HDOJ  2549    壮志难酬

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2549#include using namespace std;int main(){    intT,n,i;    strings;   cin>>T;   while(T--)    {       int flag=0;       cin>>s>>n;   

2015-12-18 18:08:00 357

原创 HDOJ  2548   两军交锋

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2548#include int main(){    int T;    doubleu,v,w,l;   scanf("%d",&T);   while(T--)       scanf("%lf%lf%lf%lf",&u,&v,&w,&l),printf("%.3lf\n",l*

2015-12-18 18:07:57 359

原创 HDOJ  2500   做一个正气的杭电人

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2500#include int main(){    int z, n, i,j;    scanf("%d",&z);    while (z--!= 0)    {       scanf("%d", &n);       for(i=0; i       {     

2015-12-18 18:07:54 378

原创 HDOJ 1847   Good Luck in CET-4 E…

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1847一道简单的找规律的题,也属于博弈问题的一种,,,,#include using namespace std;int main(){    int n;   while(cin>>n)       n%3?cout    return0;}

2015-12-18 18:07:52 434

原创 HDOJ  1846   Brave Game

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1846这是一道简单的博弈问题,找出规律即可,数字n,m第一次如果石子n<m的话,Firstwin。只要石子每次比m的倍数多一个的话第一个人无论怎么取,给第二个人留下的总能被取玩,,,,#include using namespace std;int main(){    intT,n,m;

2015-12-18 18:07:49 494

原创 HDOJ&nbsp;1028&nbsp;&nbsp;&nbsp;Ignatius&nbsp;and&nbsp;the&nbsp;Pri…

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1028 简单的整数拆分问题,题解分析请见:http://blog.sina.com.cn/s/blog_9635e5ef01016vyn.html#include #include #include #define N 130int n[N][N];void init(){    int

2015-12-18 18:07:46 607

原创 整数拆分问题

1 = 1; 2 = 2;2 = 1 + 1; 3 = 3;3 = 2 + 1;3 = 1 + 1 + 1; 4 = 4;4 = 3 + 1;4 = 2 + 2;4 = 2 + 1 + 1;4 = 1 + 1 + 1 + 1; 5 = 5;5 = 4 + 1;5 = 3 + 2:5 = 3 + 1 + 1;5 = 2 + 2 + 1;5 = 2 + 1 +

2015-12-18 18:07:44 625

原创 HDOJ&nbsp;&nbsp;&nbsp;2081&nbsp;&nbsp;&nbsp;手机短号

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2081#include #include int main(){    int T;    chara[11];   scanf("%d",&T);   while(T--)    {       scanf("%s",a);       printf("6");     

2015-12-18 18:07:42 535

原创 HDOJ&nbsp;&nbsp;&nbsp;2072&nbsp;&nbsp;&nbsp;单词数

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2072C语言的方式,gets()读入空格#include#include#define N 10000char  article[N],tmp[101],word[N][101];int main(){    intlen,pos,k,cnt;   while(gets(article

2015-12-18 18:07:39 393

原创 HDOJ&nbsp;&nbsp;2025&nbsp;&nbsp;&nbsp;查找最大元素

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2025#include #include int main(){    intlen;    chara[105],p;   while(scanf("%s",a)!=EOF)    {       len=strlen(a);       p=a[0];       fo

2015-12-18 18:07:36 316

原创 HDOJ&nbsp;&nbsp;2024&nbsp;&nbsp;&nbsp;&nbsp;C语言合法标识符

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2024主要判断第一个字母,和中间的字母是否由字母,数字,下划线组成#include #include int main(){    intT,flag;    chara,temp;   scanf("%d",&T);   temp=getchar();   while(T--

2015-12-18 18:07:34 377

原创 HDOJ&nbsp;&nbsp;2016&nbsp;&nbsp;&nbsp;数据的交换输出

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2016#include #include #define SWAP(A,B) {int T;T=A;A=B;B=T;}int main(){    int n;    intmin,local,a[105];   while(scanf("%d",&n),n)    {       

2015-12-18 18:07:31 444

原创 HDOJ&nbsp;&nbsp;2014&nbsp;&nbsp;&nbsp;&nbsp;青年歌手大奖赛_评…

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2014#include #include int main(){    int n;    floatmax,min,sum,a[105];   while(scanf("%d",&n)!=EOF)    {       sum=0;       for(int i=0;i  

2015-12-18 18:07:29 341

原创 HDOJ&nbsp;&nbsp;&nbsp;2013&nbsp;&nbsp;&nbsp;&nbsp;蟠桃记

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2013简单题,直接找规律.....#include #include int main(){    intn,sum;   while(scanf("%d",&n)!=EOF)    {       sum=1;       for(int i=1;i           s

2015-12-18 18:07:27 406

原创 HDOJ&nbsp;&nbsp;2012&nbsp;&nbsp;&nbsp;素数判定

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2012想想应为要测试多组数据,使用素数表还是比较好点#include #include #define SWAP(A,B) {int T;T=A;A=B;B=T;}bool p[3000];void prime(){   memset(p,false,sizeof(p));    for

2015-12-18 18:07:24 299

原创 HDOJ&nbsp;&nbsp;&nbsp;2007&nbsp;&nbsp;&nbsp;平方和与立方和

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2007#include int main(){    intn,m,k,d,temp;   while(scanf("%d%d", &n,&m) !=EOF)    {       k=0;       d=0;       if(n>m)       {         

2015-12-18 18:07:22 302

原创 HDOJ&nbsp;&nbsp;2005&nbsp;&nbsp;&nbsp;第几天?

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2005只要知道什么是闰年就可以....能被4整除,不能被100整除,但能被400整除。#include int r[12]={31,29,31,30,31,30,31,31,30,31,30,31};int p[12]={31,28,31,30,31,30,31,31,30,31,30,31};

2015-12-18 18:07:19 383

原创 HDOJ&nbsp;&nbsp;2004&nbsp;&nbsp;&nbsp;成绩转换

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2004记得这是刚刚学习C++时候,学习while循环编的....#include int main(){    int n,k;   while(scanf("%d", &n) != EOF)    {       if(n 100)           printf("Score

2015-12-18 18:07:17 374

原创 HDOJ&nbsp;&nbsp;1019&nbsp;&nbsp;Least&nbsp;Common&nbsp;Multipl…

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1019简单题,直接求最小公倍数就可以#include #include int gcd(int a,int b){   return!b?a:gcd(b,a%b);}int lcm(int a,int b){   return a/gcd(a,b)*b;}int main(){   

2015-12-18 18:07:15 555

原创 HDOJ&nbsp;&nbsp;1017&nbsp;&nbsp;&nbsp;&nbsp;A&nbsp;Mathematical&nbsp;Cur…

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1017水题,没有其它巧妙的办法,直接来做就可以,,问题是题目要读清楚,输出格式伤不起......#include int main(){    intnumber,n,m,e,sum,flag=0;   scanf("%d",&number);   while(number--)  

2015-12-18 18:07:12 1288

原创 HDOJ&nbsp;&nbsp;1013&nbsp;&nbsp;&nbsp;Digital&nbsp;Roots

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1013#include #include #include int root(int a){   int t=0;  while(a>9)   {    t+=a;    a=(a-a)/10;    }   if(t+a>9)       t=root(t+a);  

2015-12-18 18:07:10 381

原创 HDOJ&nbsp;&nbsp;1012&nbsp;&nbsp;&nbsp;&nbsp;u&nbsp;Calculate&nbsp;e

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1012注意一下中间数据的保存,和最后结果的输出...#include int main(){    printf("ne\n");    printf("------------\n");    printf("01\n");    printf("12\n");    print

2015-12-18 18:07:07 513

原创 HDOJ&nbsp;&nbsp;1016&nbsp;&nbsp;&nbsp;Prime&nbsp;Ring&nbsp;Problem

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1016题解:素数环:由1到n个数构成一个环,其中环内任意2个相邻的数字之和是素数。   比较经典的搜索题,由于n#include #include using namespace std;const int MAXN = 41;bool visit[MAXN];int n,p[MAXN]

2015-12-18 18:07:05 759

原创 HDOJ&nbsp;&nbsp;2181&nbsp;&nbsp;&nbsp;哈密顿绕行世界问题

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2181有两种代码,感觉都挺好的#include #include using namespace std;const int MAXN = 23;bool visit[MAXN];int n,g,p[MAXN][3],pas[MAXN];void dfs(int c,int cnt){  

2015-12-18 18:07:02 390

原创 HDOJ&nbsp;&nbsp;1181&nbsp;&nbsp;&nbsp;&nbsp;变形课

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1181#include#include #includeusing namespace std;struct{    charbeg;    charend;}M[101];bool hash[101],f;int N;bool DFS(char ch){    if(ch

2015-12-18 18:07:00 517

原创 HDOJ&nbsp;1350&nbsp;&nbsp;&nbsp;&nbsp;Robot&nbsp;Motion

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1035这几天学习搜索,只能做一些简单的水题....#include #include char map[12][12];int visit[12][12];int main(){    charp,local;    inta,b,c,M,N,sum;   while(1)   

2015-12-18 18:06:57 359

tonic-refs_heads_master.tar.gz

Google开发的新的操作系统Fuchsia其中的tonic相关的代码,在学习flutter和dart源码的时候里面会用到部分代码。

2019-08-09

微信webview唤起外部客户端接入说明2018版

微信webview唤起外部客户端接入说明2018版。 为提升微信 webivew 中网页打开其他应用的体验,防止诱导点击、强制跳出等不合理行为, 我们的“唤起外部客户端”的能力统一调整为: 1、 在 6.5.16 及以上版本的微信客户端中,贵方网页将只能使用 launchApplication 接口,打 开其他应用。该接口会在唤起前要求用户接受弹窗确认。 2、 在 6.5.16 以下版本的微信客户端中,贵方网页可以继续使用现有方式,打开其他应用。

2019-02-21

gradle_2.0.0-instant-run源码

gradle_2.0.0-instant-run源码,可查看BootstrapApplication,IncrementalClassLoader等类。

2018-05-10

红黑树相关代码以及解析

红黑树的添加、删除、遍历等代码&以及注释,提供测试样例~!

2018-03-12

深入探索Android热修复技术原理

阿里巴巴开源的《深入探索Android热修复技术原理》,其中讲述了热修复技术以及原理。

2017-11-09

BinaryTree二叉树操作相关代码

二叉树相关操作:判断是否为二叉排序树、完全二叉树、二叉平衡树;翻转二叉树,求树的深度、叶子节点个数,某节点到根节点的路径,两个节点的最近公共节点等等。

2017-10-19

IntelliJ IDEA入门图文教程整理(全部)

史上最全的的Intellij IDEA使用文档,图文结合正确的描述个性化的设置。适用于Intellij IDEA,Android Studio,Web Storm等等。

2016-10-17

org.apache压缩工具包

由apache提供的压缩解压工具类,比JDK原生类库中的方法更好使用。

2015-04-02

Java中的pingying工具包pinyin4j-2.5.0.jar

汉子转化拼音的工具包,可以把汉子的字母提取出来,这样方便与做类似于通讯录的Demo。

2014-08-08

Eclipse智能提示删除空格,等于,分号键,点上屏

Eclipse其Version: 4.2.2的去掉不需要的(eg:空格或等号或其他)按键上屏提示,增加自己需要的按键提示。

2014-08-07

动态绘制图片

BitMap代表一张位图,BitmapDrawable里封装的图片就是一个Bitmap对象,开发者被一个Bitmap对象包装成BitmapDrawable对象,可以调用BitmapDrawable的构造器。再者对它进行平移,缩放,旋转等。

2014-07-23

NotificationDemo

调用getSystemService(NOTIFICATION_SERVICE)方法获取系统的NotifacationManager服务 通过构造器创建一个Notification对象 为Notification设置各种属性 通过NotificationManager发送Notification。

2014-07-16

FTP套接字编程

在前三个实验的基础上,将其改造为一个能传输指定文件名称的点对点文件传输软件 设计并实现一个支持多个客户端的文件传输服务器 客户端等待键盘输入文件名称,然后将文件名称传输给服务器,服务器在预先设置好的文件夹下查找该文件,如果发现同名文件,开始传输回客户端,客户端接收完文件后将文件以输入的文件名称保存在本地某个目录即可,否则告诉客户端文件不存在。

2014-04-23

Windows下多线程套接字编程

windows下的多线程的并发的套接字编程

2014-04-09

Windows平台简单socket编程

(1)在Windows上,编写、编译1个客户机端程序和1个服务器端程序。要求客户机端程序能发送请求给服务器端程序,服务器端程序收到后能发送本机时间给客户机端程序。 (2)在相同或不同机子上,先运行服务器端程序可执行文件,后运行客户机端程序可执行文件。

2014-03-27

内排序算法比较

1) 对以下 6 种常用的内部排序算法进行比较:起泡排序,直接插入排序,简单选择排 序,快速排序,希尔排序,堆排序。 2) 待排序记录的文件个数不小于 1000( 其数据用伪随机数产生 ),至少用5 组不同的 输入数据作比较;比较的指标为关键字的比较次数和关键字的移动次数(一次关键 字交换计为3 次移动)。 3) 统计在完全正序、完全逆序及无序情况下的关键字比较次数和移动次数。 4) 对结果作简单分析,包括对各组数据得出结果波动大小的解释。

2013-03-14

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

TA关注的人

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