自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 资源 (1)
  • 收藏
  • 关注

原创 leetcode 40. Combination Sum II

39的加强版。。。直接用了stl的sort 跟 unique.不要在意复杂度(逃 class Solution { public:     vector temp;     void dfs(vector>& res, vector& candidates, int sum, int pos, int target) {         if (sum == target) {

2018-01-28 21:23:09 173

原创 leetcode。 39. Combination Sum

又是dfs水题。 class Solution { public:     vector temp;     void dfs(vector>& res, vector& candidates, int sum, int pos, int target) {         if (sum == target) {             res.push_back(temp);  

2018-01-28 21:14:16 192

原创 leetcode 37 sudoku solver

emmm暴力dfs。。。真的爆力 class Solution { public:          bool isValidSudoku(vector>& board, int x,int y) {         int i, j;           for (i = 0; i             if (i != x && board[i][y] ==

2018-01-28 20:05:09 202

原创 leetcode 36. Valid Sudoku

啊,我还以为求数独呢,原来是求当前的是否符合数独的规范。。 那就横、竖、小九宫格分别判断是否有相同的呗。 class Solution { public: bool isValidSudoku(vector>& board) { unordered_map row, col, all; for (int i = 0; i < 9; ++i) {

2018-01-12 18:52:36 196

原创 codeforces Hello 2018 C. Party Lemonade(贪心)

C. Party Lemonade time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A New Year party is not a New Year party w

2018-01-09 16:33:08 505

原创 codeforces Hello 2018 B. Christmas Spruce

B. Christmas Spruce time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Consider a rooted tree. A rooted tree ha

2018-01-09 15:30:16 309

原创 Codeforces Round #456 (Div. 2) D. Fishes (期望 贪心)

D. Fishes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output While Grisha was celebrating New Year with Ded Mor

2018-01-06 19:45:28 561

原创 Codeforces Round #456 (Div. 2) B. New Year's Eve (贪心

B. New Year's Eve time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Since Grisha behaved well last year, at Ne

2018-01-06 16:11:51 592

原创 bzoj 1026: [SCOI2009]windy数 (数位dp)

1026: [SCOI2009]windy数 Time Limit: 1 Sec  Memory Limit: 162 MB Submit: 8940  Solved: 4048 [Submit][Status][Discuss] Description   windy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道, 在A

2018-01-05 09:51:56 279

原创 bzoj 1024: [SCOI2009]生日快乐

1024: [SCOI2009]生日快乐 Time Limit: 1 Sec  Memory Limit: 162 MB Submit: 3081  Solved: 2241 [Submit][Status][Discuss] Description   windy的生日到了,为了庆祝生日,他的朋友们帮他买了一个边长分别为 X 和 Y 的矩形蛋糕。现在包括windy ,一共有 N

2018-01-04 13:00:21 252

原创 bozj. 1016: [JSOI2008]最小生成树计数

1016: [JSOI2008]最小生成树计数 Time Limit: 1 Sec  Memory Limit: 162 MB Submit: 6702  Solved: 2731 [Submit][Status][Discuss] Description   现在给出了一个简单无向加权图。你不满足于求出这个图的最小生成树,而希望知道这个图中有多少个不同的 最小生成树。(如果两颗最

2018-01-03 20:31:25 322

空空如也

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

TA关注的人

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