码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
PushMeBaby 使用
github 下载地址 https://github.com/stefanhafeneger/PushMeBaby 1.运行如果报错,那么导入CoreServices.framawork 替换这句 #include   为  #include 2.把你的开发证书.cer 文件更改名为apns.cer,放入工程中,代码中是通过 self.certificate = [[NSBu...
分类:其他好文   时间:2015-07-16 16:50:54    阅读次数:139
Codeforces 551B: Zguki stringZ
题意:给你3个字符串a,b,c(均由小写英文字母构成),要求移动字符串a里面字母的位置,使得a字符串里b,c出现的总次数最多,并且重叠部分不算在内。 思路:先枚举其中一个字串(b或c)在a中出现的次数,然后计算对应情况下,另一字串出现的次数,保留最大的那个总次数和即可。 代码如下: #include #include #include #include using namespace std...
分类:其他好文   时间:2015-07-16 16:46:39    阅读次数:102
poj 1743 Musical Theme(后缀数组)
?? 题意:给出一段只有音高(整数表示),没有节奏的乐谱,问其中最长的曲调相同的没有重叠的两段的长度是多少。 思路是首先对相邻元素做差并平移,那么问题就转化为了求一个字符串的不可重叠最长重复子串。 注意有两个坑,首先n为1时要特判因为height数组表示的是相邻sa的最长公共前缀。 其次用cin会超时。注意这两个问题后这道题就比较容易了。 #include #include #i...
分类:编程语言   时间:2015-07-16 16:46:18    阅读次数:101
POJ 2486 Apple Tree (树形dp)
这是一个树上的背包转移。注意要用dp[i][j][k]表示第i个节点用了j的路程是否回到i节点,k=0表示回到i点,k=1表示不回到i点。那么实际上就是树上的一个背包转移。 #include #include #include #include #include #include #include #include #include #include #include #i...
分类:移动开发   时间:2015-07-16 16:45:15    阅读次数:133
poj1699--Best Sequence(dfs+剪枝)
题目链接:点击打开链接 题目大意:给出n个字符串,要求组合后的串最短 #include #include #include using namespace std ; char str[12][22] ; char s[300] , s1[300] ; int vis[12] , min1 , n , l[12]; void dfs(int cnt,int k) { //prin...
分类:其他好文   时间:2015-07-16 16:43:28    阅读次数:89
二十三种设计模式——工厂模式
二十三种设计模式——工厂模式 简单工厂模式          简单工厂模式又称静态工厂方法(StaticFactory Method)模式,不属于23种模式之一。 简单工厂模式是工厂模式最简单使用的模式。 类图: 程序: #include #include using namespace std; class NationalFlag//父类 { public:...
分类:其他好文   时间:2015-07-16 16:41:32    阅读次数:97
UVA - 1153 Keep the Customer Satisfied
题目大意:有n个客户,去买一家商场,结算时候排队,每个顾客有一个等待时间,过了等待时间顾客就会不满,然后每个顾客又有一个结算时间,问说最多让几个顾客满意。解题思路:先按照等待时间从小到大排列,然后遍历一遍,每次加上当前人的时间,如果时间超过了当前的等待时间,则减掉前面满意人当中结算时间最长的那个人的时间。#include #include #include <alg...
分类:其他好文   时间:2015-07-16 16:39:52    阅读次数:106
一个free的问题
请看下面的代码:#include#include#include#include#include#includevoid destroy(int * p){ if(p != NULL) { free(p); p = NULL; }}int main(){...
分类:其他好文   时间:2015-07-16 16:29:35    阅读次数:95
SysTick Software Timer
1 #ifndef __SYSTEM_H__ 2 #define __SYSTEM_H__ 3 4 #include 5 #include 6 7 #include "bsp.h" 8 9 extern void sys_srand( unsigned int seed );10 ext...
分类:其他好文   时间:2015-07-16 16:25:06    阅读次数:350
hdu 1074 状压dp
//2015.7.16 首A 1 #include "bits/stdc++.h" 2 using namespace std; 3 int T; 4 int N; 5 char subject[20][110]; 6 int deadline[20], spend[20]; 7 int dp[40...
分类:其他好文   时间:2015-07-16 16:21:09    阅读次数:97
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!