码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
CSU 1120 病毒
最长公共上升子序列(LCIS)裸的算法题,没什么好说的。ps:找这个算法的时候看到某队省赛的时候不会,同病相怜哈,还好我们只是训练赛不会。灭哈哈哈~ 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int...
分类:其他好文   时间:2014-09-02 19:39:05    阅读次数:190
有头结点的链表操作
#include#include using namespace std;struct Node{ int data; Node *next;};//没有头结点的插入新节点Node* AddNode(Node *head,int num)//如果是void 类型的 那么head要用指向指...
分类:其他好文   时间:2014-09-02 19:34:45    阅读次数:217
[原创]二叉树相关笔试题代码
1 //二叉树问题集: 2 //20140822 3 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std; 11 ...
分类:其他好文   时间:2014-09-02 19:29:35    阅读次数:301
codeforces 463D Gargari and Permutations(dp)
题目参考网上的代码的、、、//要找到所有序列中的最长的公共子序列,//定义状态dp[i]为在第一个序列中前i个数字中的最长公共子序列的长度,//状态转移方程为dp[i]=max(dp[i],dp[j]+1); j#include #include using namespace std ;int a...
分类:其他好文   时间:2014-09-02 19:26:05    阅读次数:145
IL查看委托
通过IL来查看委托的原理,写一个委托的类如下: 这段代码结构比较简单:首先定义了一个包含两个方法的类IntOperations,然后定义了一个委托IntOp,最后用写了一个类MainProgram来演示结果。 using System;namespace MyCollection{ //定义一个类,...
分类:其他好文   时间:2014-09-02 19:20:55    阅读次数:293
XTU_1184 A Love Letter
http://202.197.224.59/OnlineJudge2/index.php/Problem/read/id/1184 给定原字符串,和需要删掉的字符串集,然后输出删除后的字符串,如果长度变为0,输出LOSER。 考验编码能力  !! #include #include #include using namespace std; char ss[10][10]={"HATE","...
分类:其他好文   时间:2014-09-02 17:57:35    阅读次数:176
事件与委托
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace 事件学习 { //触发事件的对象称作发送者(sender),捕获事件并且做出响应的对象称作接...
分类:其他好文   时间:2014-09-02 17:57:05    阅读次数:184
POJ2013 Symmetric Order(继续我的水题之路)
【题意简述】:这个题意描述很简单,看输入输出就可以了。 【分析】:还是刷水题心情好点~ 不过,不知为什么我的代码,G++过了,而C++却CE。// 748K 16Ms #include #include using namespace std; #include string cha[26]; string cha1[26],cha2[26]; int main() { int n; ...
分类:其他好文   时间:2014-09-02 17:53:55    阅读次数:251
打印文件的最后K行(C++和Java实现)
如题,file.txt的内容如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 C++实现: #include #include #include using namespace std; //const unsigned int k = 5; #define k 5 void printLastKLines(ifstream &...
分类:编程语言   时间:2014-09-02 17:50:05    阅读次数:192
Single Number II
Given an array of integers, every element appears three times except for one. Find that single one. #include #include #include using namespace std; #define STOP system("pause") #if 0 class Soluti...
分类:其他好文   时间:2014-09-02 17:46:55    阅读次数:177
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!