自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 hdu 5402 Travelling Salesman Problem

运行这些测试数据都对,但就是wa //4 4//2 3 3 3//3 3 3 3//3 3 3 3//3 3 3 2//answer://43//DRRURDDLLLDRRR////4 4//2 1 3 3//3 3 3 3//3 3 3 3//3 3 3 2//answer://43//DRRURDDLLLDRRR

2015-08-29 10:19:46 645

原创 随机组队_第一场

感觉自己思维很不严谨,问题想得过于简单,或者过于复杂(一般过于复杂的都是没有思路的。。。。)组队一共三人,需要发挥队员各自的优势,比如开始时候,每个人分配一定的题进行解答,一个人正着读题,一个人倒着读,一个人从中间读,如果看到别人很快就a了一道题,那么就分配一个人去a那道题,而其他人继续读题,把题目看一遍,并记录每个题的难度和考察方向,也可以不先易后难,几个人每个人看一道,先写那些看着不算

2015-08-27 14:58:21 763

原创 CodeForces 339D Xenia and Bit Operations 线段树

用线段树,关键点在于,一般用线段树时,先建树、再更新、再查询。而这种方法把它们综合在一起!!!别人的代码。。。。。。。~_~#include#includeusing namespace std;int sign[1 void update(int o, int l, int r,int p, int v, bool t){    int M = (l

2015-08-26 21:27:52 788

原创 poj 1321 棋盘问题 dfs

这道题并不是很难,但由于惯性思维,会考虑dirx[]、diry[]进行位置的点变换,但发现这样子并不很容易就能递归出来。这一题用的行列变换,这道题的价值就在于开拓思维,并不在于难度。#include#include#includeusing namespace std;const int maxn = 10;char maps[maxn][maxn];int vis[m

2015-08-26 21:25:13 671

原创 HDU2795 Billboard 线段树

开始的代码,暴力求解。。。。。果断超时#include #include #include using namespace std;const int maxn = 200005;int main(){    int  h, w, k, b;    int  a[maxn] ;    bool flag;    while(scanf("%d

2015-08-26 15:12:42 581

原创 常见错误

runtime  error (运行时错误)就是程序运行到一半,程序就崩溃了。比如说:①除以零②数组越界:int a[3]; a[10000000]=10;③指针越界:int * p; p=(int *)malloc(5 * sizeof(int)); *(p+1000000)=10;④使用已经释放的空间:int * p; p=(int *)malloc(5

2015-08-25 08:41:53 651

原创 hdu1233 还是畅通工程 prim

#include #include #include using namespace std;const int maxn = 105;const int INF = 0xffffff;struct Node{    int vex,weight;    Node(int _vex = 0,int _weight = 0) : vex(_vex),weigh

2015-08-23 22:12:13 690

原创 poj 2349 Arctic Network

————————————————————————————————————————————————~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~————————————————————————————————————————————————这是别人的代码,

2015-08-23 16:25:00 691

原创 hdu 5417 Victor and Machine

有的是直接简单模拟,我的方法是推公式,1,n==1 时直接输出 2,w > x ,w == x,  w #includeint main(){    int x, y, w, n;    int k, sumt, a, b;    while(scanf("%d%d%d%d", &x, &y, &w, &n) != EOF){   

2015-08-22 23:40:05 800

原创 hdu1698Just a Hook

线段树区间更新  菜鸟之伤 __int64!!!!#include#include#includeusing namespace std;const int maxn = 100050;struct Tree{    int l, r, setv, sum;}tree[maxnint n;__int64 sumn;void

2015-08-21 16:40:03 586

原创 poj 3468 Simple Problem with Integers

线段树的区间修改开始时套模板, 没做出来,runtime error, 找了许久错误,发现是数据类型应该用long long  。。。。~_~| |。。#include#includeusing namespace std;const int maxm = 100005;struct Tree{    int l; int r;  long long s

2015-08-21 16:31:00 517

原创 hdu 1061 Rightmost Digit

暴力解决不了问题,有规律可循, 只需看末尾数字即可, 末尾数字的 n 次方是有规律的#includeusing namespace std;int main(){ int n; int t; while(scanf("%d",&t) != EOF){ while(t--){ scanf("%d", &n);

2015-08-21 08:10:00 843

原创 暑假集训第四周第一练

http://acm.hust.edu.cn/vjudge/contest/view.action?cid=88591#problem/A第一题:并不难,当时没读懂题意。。。。第二题:我的first blood。数学题 第三题:没读懂题意,没读懂题意。。。第四题:并查集,不难第五题:求质数,算是数学题吧,不难第六题:是道几何问题,问在两个矩形在不重叠的情况下,能

2015-08-19 21:06:26 394

原创 uva11040

这是道数学题, 并不难 例如:3 ? 3 ? 5 ? 2b c ? ? ? ? ? ?2 a 1 ? 2 ? 1 ? 1 ?怎么确定a?  有个等式3=b+c , b = 2 + a , c = 1 + a 由此得到 3 = 2 + 1 + 2 *a ,可解得 a。同理 可得 其他未知项#include#include#inc

2015-08-19 17:34:11 756

转载 SPFA算法

SPFA算法SPFA(Shortest Path Faster Algorithm)(队列优化)算法是求单源最短路径的一种算法,在Bellman-ford算法的基础上加上一个队列优化,减少了冗余的松弛操作,是一种高效的最短路算法。简    称SPFA全    称Shortest Path Faster Algori

2015-08-14 11:07:50 574

转载 km算法

先说KM算法求二分图的最佳匹配思想,再详讲KM的实现。【KM算法求二分图的最佳匹配思想】对于具有二部划分( V1, V2 )的加权完全二分图,其中 V1= { x1, x2, x3, ... , xn }, V2= {y1, y2, y3, ... , yn },边具有权值 Wi,j。该带权二分图中一个总权值最大的完美匹配,称之为最佳匹配。 记 L(x) 表示结点 x的

2015-08-14 10:31:31 2540

原创 HDU1879 继续畅通工程

把状态为1的权重都改为0,之后prim()就可以了。#include#include#include#includeusing namespace std;const  int maxn = 105;const  int INF = 1 struct Node{    int vex, weight, state;    Node(int

2015-08-13 08:02:26 585

原创 hdu1596 find the safest road

n 次爆表,还是找到了错误,原来是把Floyd()写在循环体里了。。。。不足之处,多多指教。14481443    2015-08-12 17:12:05    Accepted    1596    3588MS    15960K    1010 B    C++  #include#include#include#includeusing name

2015-08-12 17:19:04 680

原创 HDU1162

我的思路   将所有点两两相连, 转化成线段 ,再用克鲁斯卡尔#include#include#include#include#includeusing namespace std;const int maxn = 105;const int maxm = 5010;struct Point{    double x, y;    Point

2015-08-12 16:34:18 612

原创 HDU1272 小希的迷宫

//先判断是否能成为一棵树,没有多余的节点//在判断是否生成环  //解决第一个问题,直接合并//解决第二个问题,查找 #include#include#includeusing namespace std;const int maxn = 100010;struct Edge{    int v1, v2;    Edge(int _v1 =

2015-08-11 21:28:25 409

原创 HDU1301 Jungle Roads

#include#include#include#include#includeusing namespace std;const int maxn = 30;const int maxm = 500;struct Edge{    int  v1, v2;    int weight;    Edge(int _v1 = 0 , int _v2

2015-08-11 17:35:15 388

原创 HDU1233畅通工程

#include#include#include#includeusing namespace std;const int maxn = 105;const int maxm = 50005;struct Edge{    int v1, v2, weight;    Edge(int v1=0, int v2=0, int weight=0):v1(v

2015-08-10 22:28:01 362

原创 HDU1429 胜利大逃亡

这道题用的是广搜,状态压缩,起初不理解状态压缩是怎么回事,一个点可以被访问多次,怎么就还能找到最短路径?现在有所顿悟,每到达一种新的状态就是一个新的开始(把它看作又一个起点),那么用广搜,起点到终点,是可以找到最短路径的。#include #include #include using namespace std;char grap[25][

2015-08-09 19:09:36 540

原创 HDU 2128 Tempter of the Bone II

这是一道搜索的题目,不算太难,思路和其他搜索题目一样用广搜 , 起初考虑问题时简单的把所有找过的点都标记为1, 问题来了当找到钥匙时没有办法返回,于是考虑取消标记, 虽然样例可以输出,但明显很占内存,因为每个点可以被重复访问,由此可见还是要标记的,问题是怎么标记。 首先想到的是访问过的依旧标记为1,有炸药时可以通过,没炸药时不能通过,虽然比开始时减少了一定访问量,但依旧很占内存

2015-08-09 16:08:48 632

原创 uva 1368 DNA序列

这是道水题 %s 输出是从第一个位置开始读, 遇'0'结束!所以在存str 是 j-1 , 而不是j #include#includeint main(){        int n, m, t;    char maps[55][1005];    char str[1005], ch[5] = { '0', 'A', 'C', 'G',

2015-08-09 13:46:58 746

原创 UVA232 纵横字的解答

不管如何还是纪念一下!花费了将近2个小时,却还是wa。。。不说什么了和样例输出一样, 不知道是哪里出了错。。。#include#includeint main(){    int n, m, coun, k=0;    char maps[15][15];    int numap[15][15];    memset(numap,0,sizeo

2015-08-09 11:32:36 484

原创 HDU2036

是道水题题意 :       给出按逆时针排序的n个整数点,求所围成多边形的面积思路 :      进行分割,利用有向面积计算#include //(x0,y0), (x1,y1), (x2, y2)是逆时针返回值为正,顺时针返回值为负 double area(double x0, double y0, double x1,double y1,

2015-08-09 09:29:49 2752

原创 UVa227 Puzzle

第二篇博客,好不容易才a掉,总结一下

2015-08-07 17:28:40 353

原创 UVa455周期串

这是写第一篇博客,比较水。。。

2015-08-07 16:23:21 916

kaggle-dataset sentiment-analysis-on-movie-reviews

The Rotten Tomatoes movie review dataset包含train.tsv >8M和test.tsv >3M两个文件 kaggle下载地址: https:// www.kaggle.com/c/sentiment analysis on movie reviews/data 分类标签如下: 0 negative 1 somewhat negative 2 neutral 3 somewhat positive 4 positive

2020-08-05

baike_spider.zip

博文对应的代码 https://blog.csdn.net/efine_dxq/article/details/90736671

2020-04-29

etc目录详解

Linux,etc目录为配置文件目录,基本上硬件和软件配置文件都在此目录下。 adjtime---包括了调整硬件时钟的数据 aliases---包含了linux邮件服务所有的分发列表 bashre---为shell用户设置系统范围的缺省设置。(缺省情况下,它的设置shell提示符包含当前用户名,主机名,当前目录和其他值) cdrecord.conf---包含了刻录cd所用的缺省值 crontab---设置cron环境变量和运行自动任务的时间 csh.cshrc(或cshre)---csh(c shell) 用户设置系统范围的缺省值 explrts---包含了本地目录的列表,这些目录可被使用网络文件系统

2017-01-18

空空如也

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

TA关注的人

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