自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

你想要的,岁月都会给你!

  • 博客(36)
  • 收藏
  • 关注

原创 关于C++中的输入一行问题

getline,get

2017-09-01 20:56:40 6898

原创 关于oracle 登陆ie信任证书问题

第一次学习oracle,刚刚装好软件,然后在IE上登陆OEM时,报证书错误,导航已阻止,我选择:继续浏览此网站(不推荐),但是点了之后还没有反应。最后在网上找到解决方法: 在cmd 运行下面命令  certutil -setreg chain\minRSAPubKeyBitLength 128   再次打开就可以了,目前还不懂这条命令的意思以及这个问题的根本所在,希望有大神路过可以指点一下。

2017-04-30 01:14:58 1052

原创 关于windows程序显示鼠标所在坐标

最近在学习windows程序设计,当遇到需要显示鼠标所在坐标时,因为教材都是讲vc6.0的,而在自己的vs上总出现问题。 总体思路时将坐标转换成字符串,再将字符串用TextOutW()输出。其中一个再vs可行的方案是:char s[20]; //先创建临时char* sprintf_s(s, "[ %d, %d ] ", pDoc->m_Point.x, pDoc->m_Point.

2016-10-15 14:24:20 3577

转载 基于c++标准库计算文件大小

GetFileLength()

2016-09-16 14:59:30 2073

转载 Visual Studio控制台程序输出窗口一闪而过的解决方法

刚接触 Visual Studio的时候大多数人会写个Hello World的程序试一下,有的人会发现执行结束后输出窗口会一闪而过

2016-09-13 22:59:09 15866 2

原创 光标定位gotoxy()

在c++中使用光标定位函数gotoxy(),要使用window API 封装:“` void gotoxy(int &&x ,int &&y) { COORD coord = { x,y }; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); } 需要使用window.h头文件。

2016-09-12 10:33:58 1650

转载 MFC 点击一个对话框按钮弹出另一个对话框

MFC 点击一个对话框按钮弹出另一个对话框 vs2010中 1.在资源中添加一个对话框 右击Dialog | Insert dialog 2.在对话框上添加自己需要的按钮等控件 3.双击控件会出现一个对话框,为添加的对话框命名一个类名,例如Dlg2 自动生成.cpp和.h文件 4.在第一个对话框的.cpp文件中包含上面生成的那个.h文件 5.在第一个对话框的按钮的响应函数中添加

2016-09-05 21:17:23 16898 2

原创 poj 3087 Shuffle'm Up

有s1,s2两堆颜色不一样的牌各c张,每次操作都是按照s2、s1、s2、s1….的顺序交替合成一堆共2*c张牌的s;所有s最底下一张牌是原s2的,最上面一张是原s1的,第二次操作将s的前c张牌变成新的s1,后c张变成s2; 求给定s1,s2,s,能否将s1,s2通过操作得到s,能则输出最小步数,否则输出-1;可以模拟,可以bfs;

2016-04-19 21:07:28 331

原创 hdu 1973 Prime Path

打印素数表+ bfs#

2016-04-19 20:02:44 266

原创 hdu 2616 Find a way

hdu 2616 Find a way

2016-04-14 15:28:40 312

原创 poj 3414 pots

题意: 有两个容器,一个容量为A,一个容量为B; 有三种操作: 1. FILL(i) : 给容器i装满水,i = 1 或2; 2. DROP(i ): 倒掉容器i的所有水; 3. POUR(i,j):将i中水倒入j中,直到j装满,i中可以有剩余,或者i不足以装满j;思路: BFS 加上记忆路径,难点在打印路径。代码很丑

2016-04-12 21:23:02 218

原创 poj 2251 Dungeon Master

迷宫问题求最短路,只是本题为一个3D的迷宫,同样用bfs求解,在二维基础上加一维,其他的相同。#include "iostream"#include "queue"#include "cstring"using namespace std;char maze[35][35][35];int visit[35][35][35];int stepArr[6][3] = {{1,0,0},{-1,

2016-04-11 21:34:57 262

原创 VK Cup 2016 - Round 1 (Div. 2 Edition) B

传送门http://codeforces.com/contest/658/problem/BB. Bear and Displayed Friends

2016-03-29 21:32:38 554

原创 uva 439 Knight Moves

Knight Moves A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares o

2015-12-15 18:44:37 254

原创 uva 563 Tree Recovery

输入一颗二叉树的先序遍历和中序遍历,输出后序遍历序列; 样例输入输出: DBACEGF ABCDEFG —> ACBFGED BCAD CBAD —> CDAB// 先序 = root + 左子序 + 右子序 中序 = 左子序 + root + 右子序 后序 = 左子序 + 右 子序 + root#include "iostream"#include "string"

2015-12-07 21:14:39 241

原创 UVA 10129 Play on Words

UVA 10129 Play on Words

2015-12-02 21:04:28 321

原创 codeforces Educational Codeforces Round 2 A. Extract Numbers

A. Extract Numbers time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given string s. Let’s call word any largest sequence of consecu

2015-11-29 16:28:16 257

原创 codeforces 593A 2char

Andrew often reads articles in his favorite magazine 2Char. The main feature of these articles is that each of them uses at most two distinct letters. Andrew decided to send an article to the magazine,

2015-11-24 21:20:39 271

原创 poj 3169 Layout

[题目](http://poj.org/problem?id=3169 )Layout Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8946 Accepted: 4296 DescriptionLike everyone else, cows like to stand close to their

2015-11-24 14:18:09 299 1

原创 杭电1016 Prime Ring Problem

Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 36557 Accepted Submission(s): 16114Problem Description A ring is compose

2015-11-23 17:52:08 261

原创 杭电 1010 Tempter of the Bone

The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He

2015-11-23 16:32:53 262

原创 hihocoder 1041 国庆出游

传送门描述 小Hi和小Ho准备国庆期间去A国旅游。A国的城际交通比较有特色:它共有n座城市(编号1-n);城市之间恰好有n-1条公路相连,形成一个树形公路网。小Hi计划从A国首都(1号城市)出发,自驾遍历所有城市,并且经过每一条公路恰好两次——来回各一次——这样公路两旁的景色都不会错过。令小Hi苦恼的是他的小伙伴小Ho希望能以某种特定的顺序游历其中m个城市。例如按3-2-5的顺序游历这3座城市。(

2015-11-22 16:52:16 483

原创 poj Red and Black

题目链接http://poj.org/problem?id=1979一个最基础的dfs搜索题//#include <bits/stdc++.h>#include "iostream"#include "cstring"using namespace std;typedef long long ll;int k[25][25];//标记数组char c[25][25];int ans = 0

2015-11-21 18:25:05 320

原创 hihocoder 1107 Shortest Proper Prefix

1107 : Shortest Proper Prefix时间限制:10000ms 单点时限:1000ms 内存限制:512MB 描述Query auto-completion(QAC) is widely used in many search applications. The basic idea is that when you type some string s in the se

2015-11-20 18:03:19 302

原创 hihocoder 1014 trie树

[题目链接](http://hihocoder.com/problemset/problem/1014)#include <iostream>#include <string>using namespace std;struct trie{ char key; int num; trie *next[26]; trie(){ num = 0;

2015-11-19 21:42:42 258

原创 hihocoder 1051 补提交卡

[原题目点此http://hihocoder.com/problemset/problem/1051](http://hihocoder.com/problemset/problem/1051)#include "iostream"#include "algorithm"#include "string"#include "cstdio"using namespace std;int ma

2015-11-13 21:32:37 300

原创 hihocoder 1049后序遍历

题目原地址题目中已经给出分析,下面给出根据分析写的代码#include "iostream"#include "algorithm"#include "string"#include "cstdio"using namespace std;string post_order(string str1,string str2) { if(!str1.size()) return "";//

2015-11-13 20:42:46 300

原创 hihocoder1037 数字三角形

题目链接广度优先,动态规划,题目中已有分析,根据分析贴上自己的代码#include "iostream"#include "algorithm"#include "cstdio"using namespace std;int main(){ int reward[105][105],dp[105][105]; int n; while(cin >> n) {

2015-11-13 15:12:40 476

原创 杭电1003 Max Sum

Max SumTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 188172    Accepted Submission(s): 43845Problem DescriptionGiven a sequenc

2015-10-29 21:38:07 283

原创 codeforces 591B Rebranding

B. Rebrandingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe name of one small but proud corporation

2015-10-28 21:02:38 394

原创 hihocoder1082 然而沼跃鱼早就看穿了一切

时间限制:1000ms单点时限:1000ms内存限制:256MB描述fjxmlhx每天都在被沼跃鱼刷屏,因此他急切的找到了你希望你写一个程序屏蔽所有句子中的沼跃鱼(“marshtomp”,不区分大小写)。为了使句子不缺少成分,统一换成 “fjxmlhx” 。输入输入包括多行。每行是一个字符串,长度不超过200。一行的末尾与下一行的

2015-10-24 23:38:25 485

原创 hihocoder 1102 Individual Income Tax

#1102 : Individual Income Tax时间限制:10000ms单点时限:1000ms内存限制:256MB描述For incomes from wages and salaries, the progressive tax rate in excess of specific amount is applicable.

2015-10-24 22:11:15 316

原创 hihocoder 1039 字符消除

#1039 : 字符消除时间限制:1000ms单点时限:1000ms内存限制:256MB描述小Hi最近在玩一个字符消除游戏。给定一个只包含大写字母"ABC"的字符串s,消除过程是如下进行的:1)如果s包含长度超过1的由相同字母组成的子串,那么这些子串会被同时消除,余下的子串拼成新的字符串。例如"ABCCBCCCAA"中"CC","CC

2015-10-24 19:16:12 294

原创 杭电1004——Let the Balloon Rise

Let the Balloon RiseTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 93271    Accepted Submission(s): 35594Problem DescriptionContest

2015-10-23 14:35:01 231

原创 杭电1020 ——Encoding

EncodingTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 34610    Accepted Submission(s): 15337Problem DescriptionGiven a string cont

2015-10-22 19:24:00 294

原创 acm南阳国赛—热身赛 A.Googol String

DescriptionA "0/1 string" is a string in which every character is either 0 or 1. There are two operations that can be performed on a 0/1 string:switch: Every 0 becomes 1 and every 1 becomes

2015-10-21 12:08:10 600

空空如也

空空如也

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

TA关注的人

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