码迷,mamicode.com
首页 > 其他好文
Codeforces Round #266 (Div.2) B Wonder Room --枚举
题意:给出一个两边长为a,b的矩形,要求增加a和增加b使a*b>=6*n且a*b最小。解法:设新的a,b为a1,b1,且设a#include #include #include #define lll __int64using namespace std;int main(){ lll n,a...
分类:其他好文   时间:2014-09-13 10:33:54    阅读次数:184
TimeSpan
TimeSpan的用法TimeSpan是用来表示一个时间段的实例,两个时间的差可以构成一个TimeSpan实例,现在就来简单介绍一下几点重要的用法:先来介绍几个方法TimeSpan.Minutes(其他时间比如天数,小时数,秒数都一样的情况下得到的分钟数的差),其他的Hours,Second一样Da...
分类:其他好文   时间:2014-09-13 10:33:44    阅读次数:219
二级省市联动下拉菜单
桨式搅拌机省份:县/市:
分类:其他好文   时间:2014-09-13 10:33:25    阅读次数:219
【pb_ds】【平衡树启发式合并】【并查集】bzoj2733 [HNOI2012]永无乡
用并查集维护联通性。对每个联通块维护一个平衡树。合并时启发式合并。比较懒,用了pb_ds。 1 #include 2 #include 3 #include 4 using namespace std; 5 using namespace __gnu_cxx; 6 using namespace _...
分类:其他好文   时间:2014-09-13 10:32:35    阅读次数:180
Delphi ini文件读写
首先把IniFiles加入到interface的uses里,这样才能使用Tinifile类,其他代码如下implementation{$R *.dfm}var inifile: Tinifile; filepath: string;procedure TForm1.Button1Clic...
分类:其他好文   时间:2014-09-13 10:31:54    阅读次数:131
delphi 获取可执行文件的当前路径
在Delphi SysUtils 单元中有 ExtractFileDir 与 ExtractFilePath两个类似的函数, 两个函数有以下的区别: ExtractFilePath 传回值的最後一个字元是反斜杠“/”。ShowMessage(ExtractFileDir(Application.Ex...
分类:其他好文   时间:2014-09-13 10:31:34    阅读次数:126
新增记录时返回自增ID (DAL数据访问类)
using System;using System.Data;using System.Text;using System.Data.SqlClient;using EXDataControl;using Utility;namespace BasicInformation{ /// /// 类p....
分类:其他好文   时间:2014-09-13 10:31:25    阅读次数:254
指针辨析:悬垂指针、哑指针、野指针、智能指针
悬垂指针:1:提出的原因:请看下面的代码片段:[cpp]view plaincopyprint?int*p=NULL;voidmain(){inti=10;p=&i;cout#include#include#includeusingnamespacestd;intmain(void){char*p=...
分类:其他好文   时间:2014-09-13 10:31:05    阅读次数:229
3GP文件格式研究
需要看的文档http://www.3gpp.org/ftp/Specs/archive/26_series/3GPP TS 26.2333GPP TS 26.2433GPP TS 26.244luxh找到的一个好东西http://isotc.iso.org/livelink/livelink/fe....
分类:其他好文   时间:2014-09-13 10:30:55    阅读次数:828
只管往前走
突然想,放弃好了,放弃这些,放弃全部。然后又赶紧对自己说,再坚持一下,一下下。Just turn off the feelings, then I'll go through all of this.只管往前走,就好了。
分类:其他好文   时间:2014-09-13 10:30:44    阅读次数:211
POJ 1845
此题需要注意的一个细节时,若MOD|P或MOD|(P-1),此时不能应用费马小定理求逆元的方法。这时,就要回到求解因子和的初始公式是,即那个等比数列相加的公式。这时,若MOD|P,即,余为1,若MOD|(P-1),即为K个1之和。如此,可求了。#include #include #include #...
分类:其他好文   时间:2014-09-13 10:30:24    阅读次数:172
项目质量管理
项目质量管理为项目的四大目标中最后一个,项目的质量决定一个项目的好坏,项目的质量管理是一项必不可少的工作。项目质量管理知识领域主要包含规划质量管理、实施质量保证,控制质量等3个活动。项目质量管理包括执行组织确定质量政策、目标与职责的各过程和活动,从而使项目满足其预定的需求。项目质量管理在项目环境内使...
分类:其他好文   时间:2014-09-13 10:29:44    阅读次数:277
[LeetCode]Substring with Concatenation of All Words
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:其他好文   时间:2014-09-13 09:27:24    阅读次数:202
HDU 4994 Revenge of Nim (博弈)
题目链接:HDU 4993 Revenge of ex-Euclid 题意:两个取石头,分别在N堆里去。只有第一堆取完才能取第二堆,以此类推,最后一个取完的为赢家。 思路:从头开始扫,直到第一个不为1为止,判断现在的主动权在谁手里,谁就是赢家。(这里读者可以自己写几组数据试试。) AC代码: #include #include int main() { int...
分类:其他好文   时间:2014-09-13 09:27:04    阅读次数:204
[LeetCode]Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible...
分类:其他好文   时间:2014-09-13 09:26:54    阅读次数:160
常用的增删改查函数
无论做什么系统,涉及到数据库肯定离不开增删改查,下面是自己写的有关数据库增删改查封装的函数,仅供参考。 using System; using System.ComponentModel; using System.Collections; using System.Diagnostics; using System.Data; using System.Data.SqlClient; usin...
分类:其他好文   时间:2014-09-13 09:26:44    阅读次数:164
hdu-1010 Tempter of the Bone
http://acm.hdu.edu.cn/showproblem.php?pid=1010 题意:在n*m的地图上,标记为S的为狗狗的起点,D为门,问能否恰好以给定t的时间到达D,能就输出YES,否则NO,每个点只能走一次。 思路:dfs问题,找到一条长度恰好为t的路径,不一定是最短路路径,所以不能单纯用bfs。 但是  一般dfs会超时,所以要剪枝,这里主要用到奇偶性剪枝,参考链接: ...
分类:其他好文   时间:2014-09-13 09:26:35    阅读次数:196
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!