自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(117)
  • 资源 (11)
  • 收藏
  • 关注

原创 poj 2858 Crabbles

。。。

2015-06-01 00:20:15 360

原创 hdu 5246 超级赛亚ACMer

好久没写题了,这题其实很简单的嘛,跟着样例做就是了,但是要注意 long long,我可能 wa 了不下 10 次。。。#include <cstdio>#include <iostream>#include <algorithm>#include <queue>#include <vector>#include <map>#include <set>#include <string>

2015-05-31 22:04:08 285

原创 GCJ2012 1C Problem A. Diamond Inheritance

简单的图问题

2015-04-24 17:09:42 256

原创 GCJ2012 1B A. Safety in Numbers

二分好题

2015-04-24 14:56:09 263

原创 GCJ Qualification Round 2015 Problem C. Dijkstra

...

2015-04-12 13:20:47 272

原创 GCJ Round 1C 2014 Problem A. Part Elf

思维题

2015-04-09 08:39:33 288

原创 GCJ Round 1C 2013 Problem B. Pogo

贪心

2015-04-08 18:56:18 305

原创 Google Code Jam 2013 Round 1A A题 BullsEye

数学题,二分求解

2015-04-07 11:20:15 359

原创 Google Code Jam 2014 Round 1B Full Binary Tree

最少删掉多少节点才能让一棵树变成完全二叉树

2015-04-05 19:33:44 253

原创 Google Code Jam 2014 Round 1A Charging Chaos

好题。考思维

2015-04-04 18:40:18 302

原创 poj 3264 Balanced Lineup 线段树

线段树

2015-04-03 17:28:41 266

原创 poj 1011 Sticks 剪枝

只考剪枝的题目

2015-03-19 17:37:08 246

原创 Uva10007 Count the Trees 二叉树计数

n个节点的二叉树计数

2015-03-18 19:55:38 319

原创 codeforces 520C DNA Alignment

数学

2015-03-08 14:30:28 1187

原创 codeforces 520B Two Buttons

BFS + 记忆化

2015-03-08 09:30:42 468

原创 Mac 下 Xcode 配置 GLFW 经验总结

Mac 下 Xcode 配置 GLFW 经验总结

2015-03-02 09:03:46 2761 1

原创 poj 3107 Godfather 树的重心

树的重心,不用vector保存边

2015-03-01 12:56:56 244

原创 poj 3101 Astronomy

数学题

2015-03-01 11:25:26 285

原创 poj 2286 The Rotation Game (IDA*)

IDA* 搜索

2015-02-18 12:33:05 213

原创 poj3134 Power Calculus

迭代加深搜索

2015-02-17 21:22:34 341

原创 poj1033 Defragment

用到栈思想,好题一道

2015-02-15 20:44:07 280

原创 poj2003 Hire and Fire 模拟题,树的动态操作

树的动态操作

2015-02-14 17:14:34 309

原创 poj2002 Squares 枚举+二分

枚举+二分

2015-02-12 09:50:09 276

原创 poj 2001 Shortest Prefixes Trie树

trie树

2015-02-05 17:52:53 293

原创 FacebookHackerCup_Round1 Winning at Sports

比分为x:k-xstressful : dpdp[k][x] = dp[k-1][x] dp[k][x] += dp[k-1][x-1] dp[1][0] = 1;stressfree : dpdp[k][x] += dp[k-1][x]dp[k][x] += dp[k-1][x-1]dp[1][1] = 1;#include #include

2015-01-19 10:52:21 149

原创 FacebookHackerCup_Round1 Homework

水题筛出素数以后遍历[A, B]输出primacity=K的个数#include #include #include #include using namespace std;#define MAXN 10000010int T, A, B, K, primacity[MAXN];bool isPrim[MAXN];int main(){// freopen("a.

2015-01-19 10:47:56 403

原创 FacebookHackerCup Round1 AutoComplete Trie树

Trie树往trie树内插入一个字符串的同时,把每个节点都标黑插入一个新的字符串时,第一个遇见的白色节点就是AutoComplete节点如果没遇到白色节点,只能输入全部strlen(Str)个字符#include #include #include using namespace std;int T, N;struct node{ node *ch[26]; bo

2015-01-19 10:40:58 440

原创 poj 2021 Relative Relatives

水题

2015-01-16 21:09:53 357

原创 poj2347 Equations 模拟+数学

好题一道

2015-01-13 20:04:58 381

原创 Facebook Hacker Cup 2015 Qualification Round : Cooking the Books

#include #include #include using namespace std;long long t, n, size;int arr[20];int parse(){ memset(arr, -1, sizeof(arr)); int i=0, tmp=n; while(tmp){ arr[i++] = tmp%10;

2015-01-11 18:11:46 463

原创 hdu 5101 Select

比较水n行数据,第i行有num[i]个数据,问有多少不同行的数对使得 (v[i1][j1] + v[i2][j2]) > k && (i1 != i2)思路:(所有的v[i1][j1] + v[i2][j2] > k 的对数 )- (同一行的v[i][j1] + v[i][j2] > k的对数)实现:首先把整张表放在一个数组a里,排序后对每一个数ai用二分查找aj,使得ai+aj>

2014-12-22 20:29:21 339

原创 hdu 5100 Chessboard

用长度为 k  的 筷子去铺 n*n 的棋盘,问最多能铺多少块?我的方法是:显然,可以把棋盘先围起来,会得到里面的 n' = n-2*(n%k) 子问题对于n=5,k=3,solve(n)表示最少能有多少是不能覆盖的,星号表示无法被覆盖- - - | |- - - | || | * | || | - - - | | - - - 即solve(n) = solve

2014-12-22 15:29:50 313

hdu 5100 Chessboard

用长度为 k  的 筷子去铺 n*n 的棋盘,问最多能铺多少块?我的方法是:显然,可以把棋盘先围起来,会得到里面的 n' = n-2*(n%k) 子问题对于n=4,k=3,solve(n)表示最少能有多少是不能覆盖的,星号表示无法被覆盖-  -  - | || | - - | || * *|| * * || - - -即solve(n) = solve(n-2*

2014-12-22 15:04:32 84

原创 codechef Chef Under Pressure

我也不知道这是什么类型的题目。。。数据挺水把卖商品p的第i个城市设为pi我们求的是(a, pi)的路径的所有点到b的最近距离先以b为根节点建树,显然(a, pi)路径上离b最近的点是a与pi的最近公共祖先S也就是说,a, pi在以S为根的子树内寻找S的方法是:将a到b的路径上所有的点都markpi往上走的时候遇到的第一个被标记的节点就是S#include #inc

2014-12-17 20:06:34 297

原创 codechef Chef and Bracket-Pairs

好dp

2014-12-17 08:55:55 332

原创 codechef Alok-nath and His Sanskars

把大小为n的集合S分成k个子集,使得每个子集的子集和相等,即 Si = average(S) 对于n=6,k=3, 1,2,3,3,4,5,第一个子集可能会选择(1,2,3),导致其他子集无法拼凑成功,这就意味着可能需要回溯而实际上回溯搜索肯定会 爆所以应该从大到小的进行选择。因为大的可以被拆成小的,如果 5 无法跟其他数 拼凑成平均数,那2,3也肯定不可以最后注意一个所有值都为0

2014-12-16 15:59:13 370

原创 codeforces 489 B BerSU Ball 匈牙利算法

裸的匈牙利算法求二分图#include #include #include #include #include #include #include #include #include using namespace std;#define INF 1e9#define maxn 110#define rep(i,x,y) for(int i=x;i<=y;i++)#d

2014-12-06 11:51:45 481

原创 java 对 Array 和 ArrayList 排序

package test;import java.util.Arrays;import java.util.Collections;import java.util.ArrayList;import java.util.Iterator;//java默认按字典序从小到大排序public class SortTest { //对ArrayList排序 public stat

2014-12-06 11:14:54 384

原创 java 用HashMap建表

用 HashMap 在内存中保存如下信息: 学号 姓名 成绩 71108501 张三 80.0 71108502 李四 79.5 71108503 王五 91.0 71108504 赵六 60.0 71108505 宋七 18.6 将姓名成绩储存在一个私有类Data中,将学号作为key,将Data作为valuepackage test;import ja

2014-12-05 22:02:19 517

原创 java 按照名称查找文件

学习要点:遍历Arraylist使用java.util.regex中的Pattern和Matcher使用File类使用简单的正则表达式import java.io.File;import java.util.Scanner;import java.util.regex.Matcher;import java.util.regex.Pattern;import j

2014-12-05 20:10:23 683

Optimizing Space Amplification in RocksDB

Optimizing Space Amplification in RocksDB

2017-06-20

时间序列分析及应用

时间序列分析及应用

2017-06-08

MySQL技术内幕 InnoDB存储引擎 第2版

MySQL技术内幕 InnoDB存储引擎 第2版

2016-08-31

Revisiting the Paxos algorithm

Revisiting the Paxos algorithm

2016-08-02

Building LinkedIn’s Real-time Activity Data Pipeline

Building LinkedIn’s Real-time Activity Data Pipeline

2016-08-02

Bigtable.pdf

Bigtable- A Distributed Storage System for Structured Data.pdf

2015-10-12

The Google File System.pdf

The Google File System.pdf

2015-10-12

Proactor.pdf

Proactor An Object Behavioral Pattern for Demultiplexing and Dispatching Handlers for Asynchronous Events.pdf

2015-10-12

uml英文资料

东南大学uml与面向对象课程全英文资料

2014-11-15

uva11859nim游戏 + 求素因子个数.cpp

uva11859nim游戏 + 求素因子个数.cpp

2014-09-12

HDU 2000-2099 解题报告

HDU 2000-2099 解题报告,chm格式

2014-05-28

空空如也

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

TA关注的人

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