码迷,mamicode.com
首页 >  
搜索关键字:using stacks    ( 53729个结果
Codeforces Round #244 (Div. 2) B. Prison Transfer
题目是选出c个连续的囚犯,而且囚犯的级别不能大于t#include using namespace std;int main(){ int n,t,c; cin >> n >> t >> c; int a,cnt = 0, res =0;; for(int i = 0 ; i...
分类:其他好文   时间:2014-05-04 12:14:55    阅读次数:340
Codeforces Round #244 (Div. 2) A. Police Recruits
题目的意思就是找出未能及时处理的犯罪数,#include using namespace std;int main(){ int n; cin >> n; int a,recruit = 0, crimes = 0;; for(int i = 0 ; i > a; ...
分类:其他好文   时间:2014-05-04 11:54:32    阅读次数:274
概率法计算PI
#include using namespace std;//概率计算PIint main(){ int inside=0; double val; int i; for ( i=0; i<100000000; i++) { double x = (dou...
分类:其他好文   时间:2014-05-04 11:47:49    阅读次数:262
20140503
1、队列(建议采用带头结点的链式队列) 何时为空?答:当队列头指针等于尾指针时,队列为空。(对一般队列而言,循环队列除外) //不带头结点的链式队列 //不带头结点的链式队列#include #include #include using namespace std; (出队操作) node1-->...
分类:其他好文   时间:2014-05-04 11:31:15    阅读次数:335
应用程序图标
A) App Icons1. CFBundleIcons icon名字随便取,但必须是PNG格式--系统根据icon大小选择最匹配的,而不是根据icon的名字 must reside in the top level of your app bundle. (Avoid using interl.....
分类:其他好文   时间:2014-05-04 10:26:12    阅读次数:327
Insertion Sort List
Sort a linked list using insertion sort.思路:使用插入排序来对链表进行排序。只要注意链表的边界问题,其实关键就是交换链表的值,对链表指针是没有什么影响的。接下来说下具体步骤:1.判断head或者head->next是否为空;2.循环遍历,初始条件pCur=he...
分类:其他好文   时间:2014-05-04 10:01:57    阅读次数:242
CF 427D Match & Catch 求最短唯一连续LCS
题目来源:CF 427D Match & Catch 题意:给出2个字符串 求最短的连续的公共字符串 并且该字符串在原串中只出现一次 思路:把2个字符串合并起来求height 后缀数组height的应用 #include #include #include using namespace std; const int maxn = 100010; char s[maxn]; int s...
分类:其他好文   时间:2014-05-04 09:32:45    阅读次数:315
wpf 9张图片的连连看
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; us...
分类:其他好文   时间:2014-05-04 09:30:21    阅读次数:360
[codility]Distinct
最近在学scala语言,scala代码如下: import scala.collection.JavaConversions._ object Solution { def solution(A: Array[Int]): Int = { // write your code in Scala 2.10 // using quick sort to so...
分类:其他好文   时间:2014-05-04 09:22:37    阅读次数:341
经典白话算法之快速排序
【分析】 【伪代码】 【运行过程】 【代码】 /********************************* * 日期:2014-04-01 * 作者:SJF0115 * 题目:快速排序 **********************************/ #include #include using namespace...
分类:其他好文   时间:2014-05-03 21:17:50    阅读次数:476
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!