编程及软件开发解决方案库

2000万优秀解决方案库,覆盖所有编程及软件开发类,极速查询

今日已更新 4227 篇代码解决方案

  • 1:获取当前时间(年/月/日/时//秒)

                        struct tm* GetCurTime(time_t inTime){    struct tm* curTime = localtime(&inTime);    curTime->tm_year += 1900;    curTime->tm_mon += 1;

    https://www.u72.net/daima/5f99.html - 2024-09-06 10:34:41 - 代码库
  • 2:POJ 1325 二图匹配/匈牙利算法

                        Machine ScheduleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11922 Accepted: 5077DescriptionAs we all know, machine schedu

    https://www.u72.net/daima/5z01.html - 2024-07-22 22:55:29 - 代码库
  • 3:foj 2082 树链剖 第2天

                        擦,没啥好说的,这个模板至少得打10遍。。纪念自己成功的打错了。。#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>us

    https://www.u72.net/daima/78cw.html - 2024-07-25 20:13:06 - 代码库
  • 4:Codeforces 474B Worms (二查找)

                        题目链接:Codeforces 474B Worms题意:给出一串数字比如2 7 3 4 9。表示第一堆编号是[1,2].第二堆编号是[3,9].第三堆编号是[10,12].第四堆编号是[13,16].

    https://www.u72.net/daima/79au.html - 2024-07-25 20:52:21 - 代码库
  • 5:hdu 3966 树链剖第3遍

                        真心不好意思说话,写的越多,各种问题就暴漏出来了,这次更离谱,什么错误都有。。。不过还是过了。也明白了代码以后要写规范性,不能想当然。。。#include<cst

    https://www.u72.net/daima/7mx1.html - 2024-07-25 23:09:45 - 代码库
  • 6:codeforces 359D 二答案+RMQ

                        上学期刷过裸的RMQ模板题,不过那时候一直不理解>_<其实RMQ很简单:设f[i][j]表示从i开始的,长度为2^j的一段元素中的最小值or最大值那么f[i][j]=min/max{d

    https://www.u72.net/daima/79uk.html - 2024-07-25 21:14:02 - 代码库
  • 7:【匈牙利算法】 二图模板 poj 1274

                        #include <iostream>#include <cstdio>#include <memory.h>using namespace std;int n,m,num,temp,sum;int re[201][201],link[201];//牛与牛栏的对应

    https://www.u72.net/daima/8szz.html - 2024-07-26 08:43:25 - 代码库
  • 8:Radix (25)(进制 + 二 + 模拟)

                        Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number

    https://www.u72.net/daima/nnw6a.html - 2024-09-20 13:58:53 - 代码库
  • 9:linq学习(第二部

                        8.匿名方法    (1)源起      在上面的例子中      为了得到序列中较大的值      我们定义了一个More方法           

    https://www.u72.net/daima/nnxhr.html - 2024-07-31 20:00:29 - 代码库
  • 10:POJ 1743 Musical Theme Hash+二

                        题目大意:有一段优美的旋律,他们是由一些不超过88的音调组成的。若把五个音调算作一小节,问是否有超过一小节的韵律相同(差相同,且两个相同的韵律之间不能有

    https://www.u72.net/daima/88fm.html - 2024-07-26 21:21:06 - 代码库
  • 11:BZOJ 2783 JLOI 2012 树 倍增+二

                        题目大意:给出一棵树和一个整数s,问在树上有几条这样路径,保证路径上的点权和==s,点的深度递增。输出这个数量。思路:利用倍增的思想,我们能在O(logn)的时间内

    https://www.u72.net/daima/9bf6.html - 2024-07-27 06:44:54 - 代码库
  • 12:HYSBZ 2243 染色 树链剖 线段树

                        这题对最简单的树链剖分做了一些变化,在链的转移过程中要考虑前后链相邻节点颜色是否相同。对于线段树,只要维护三个值,左端点颜色,右端点颜色还有区间颜色

    https://www.u72.net/daima/nna2a.html - 2024-07-31 07:07:55 - 代码库
  • 13:HDOJ4355-Party All the Time(三)

                        Problem DescriptionIn the Dark forest, there is a Fairy kingdom where all the spirits will go together and Celebrate the harvest every year.

    https://www.u72.net/daima/nam0a.html - 2024-09-19 15:53:08 - 代码库
  • 14:Poj2763Housewife Wind树链剖

                        边查询,点更新的模板题。#include<iostream>#include<cstdio>#include<cstring>#include<map>#include<vector>#include<stdlib.h>using namespace std;

    https://www.u72.net/daima/nnhbr.html - 2024-07-31 09:46:19 - 代码库
  • 15:图的一些定理

                        最小点覆盖:用最少的点(X集合或Y集合都的都行)让每条边都至少和其中一个点关联。结论:最小点覆盖数 = 最大匹配数M因为只需要让它们覆盖最大匹配的M条边,

    https://www.u72.net/daima/eacr.html - 2024-09-14 12:19:11 - 代码库
  • 16:Problem 2082 过路费树链剖

                        裸题直接搞。#include<iostream>#include<cstdio>#include<cstring>#include<map>#include<vector>#include<stdlib.h>using namespace std;#define ls

    https://www.u72.net/daima/nnbd0.html - 2024-07-31 12:24:44 - 代码库
  • 17:2243: [SDOI2011]染色树链剖

                        对于线段树的操作,维护左端值,维护右端值,维护种类数,更新的时候,如果左儿子的右端==右儿子的左端,种类数减一,剩下的就是细节了。#include<iostream>#include

    https://www.u72.net/daima/nndvc.html - 2024-07-31 11:46:45 - 代码库
  • 18:POJ 2112 Optimal Milking(二+最大流)

                        POJ 2112 Optimal Milking题目链接题意:给定一些机器和奶牛,在给定距离矩阵,(不在对角线上为0的值代表不可达),每个机器能容纳m个奶牛,问所有奶牛都能挤

    https://www.u72.net/daima/nndh5.html - 2024-07-31 11:30:15 - 代码库
  • 19:UVa 11396 爪分解(二图判定)

                        https://vjudge.net/problem/UVA-11396题意:给出n个结点的简单无向图,每个点的度数均为3。你的任务是判断能否把它分解成若干爪。每条边必须属于一个爪,但

    https://www.u72.net/daima/nacwn.html - 2024-09-18 12:04:32 - 代码库
  • 20:zoj3820 树的直径+二

                        这题是个遗憾 !!!!!当时一直不敢相信两个站一定在直径上,赛后想想自己真的是脑袋抽风, 如果其中一个站不在直径上就反向的说明了这条不是直径。可以很明白我们

    https://www.u72.net/daima/edsa.html - 2024-07-28 06:49:47 - 代码库