1.背包dp[i][j]无论当前物品是否不大于j都可以转移dp[i-1][j]

2.循环从0开始还是1开始的问题

3.无向图边集数组开两倍

4.(3*987654321) > maxint

4.超过maxint的常数后边一定要加LL

5.windows下,%I64d,linux下,%lld

6.搜索判断边界问题

7.把dp[j][k]打成dp[i][j]

8.棋盘类的题建图要注意y和(y-1)的问题,数组要开的大一点避免re

9.用数据结构查询修改变量要初始化

随机推荐

  1. 为Ubuntu的root设置密码

    问题描述:当安装好Ubuntu系统的时候,root用户没有密码,需要设置. 解决方法:

  2. linux下安装 oracle 11g

    oracle 11g安装 一.环境准备 划分区 / 15000M /tmp 4096M /boot 100M Swap 4096M /u01 剩余空间 2.更改主机名,ip地址 3.安装软件包 那么l ...

  3. overflow:hidden与margin:0 auto之间的冲突

    相对于父容器水平居中的代码margin:0 auto与overflow:hidden之间存在冲突.当这两个属性同时应用在一个DIV上时,在chrome浏览器中将无法居中.至于为啥我也不明白.

  4. django 一些相关问题

    这两天在处理django项目时碰到一些问题 1.ur路径设置要忽略大小写,查找了很多资料,都没有发现相关的介绍,最后在谷歌上找到一个解决方案,https://groups.google.com/for ...

  5. ANSI Common Lisp Practice - My Answers - Chatper - 3

    Ok, Go ahead. 1 (a) (b) (c) (d) 2 注:union 在 Common Lisp 中的作用就是求两个集合的并集.但是这有一个前提,即给的两个列表已经满足集合的属性了.具体 ...

  6. python读取文件夹

    import os def getFiles(rootDir): if os.path.isfile(rootDir): print(rootDir) elif os.path.isdir(rootD ...

  7. 安全测试 - XSS如何防御

    XSS主要是通过劫持用户COOKIE,执行JS脚本进行攻击 如何发现: 可以使用<script>alert(/yourname/)</script> script最具有代表性也 ...

  8. [LeetCode] Factor Combinations 因子组合

    Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a func ...

  9. [LeetCode] Meeting Rooms II 会议室之二

    Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si ...

  10. C#获取CPU占用率、内存占用、磁盘占用、进程信息

    代码: using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading ...