码迷,mamicode.com
首页 >  
搜索关键字:简单题    ( 1039个结果
[hackerrank]Palindrome Index
简单题。#include #include using namespace std;int main() { int T; cin >> T; while (T--) { string s; cin >> s; int l = 0; ...
分类:其他好文   时间:2014-08-14 01:22:57    阅读次数:207
004字符串去重 (keep it up)
设计算法并写出代码移除字符串中重复的字符,不能使用额外的缓存空间。注意: 可以使用额外的一个或两个变量,但不允许额外再开一个数组拷贝。 简单题直接上代码: #include #include void remove_duplicate(char vStr[]) { int Len = strlen(vStr); if (!Len) { printf("the stri...
分类:其他好文   时间:2014-08-13 01:11:05    阅读次数:252
CUGBACM_Summer_Tranning5
A.Number Assignment UvaLive6434 简单题 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using ...
分类:其他好文   时间:2014-08-11 21:24:12    阅读次数:393
SGU 158.Commuter Train
一道简单题。火车停的位置不是在整点就是在二分之一点,坐标*2,然后枚举火车停的位置,计算总距离即可。code:#include #include #include #include #include #define INF 309using namespace std;int L, m, n, x,...
分类:其他好文   时间:2014-08-11 14:39:22    阅读次数:217
LeetCode--Merge Intervals
简单题:先按左左边排序,然后对输入的区间和当前结果合并 1 /** 2 * Definition for an interval. 3 * struct Interval { 4 * int start; 5 * int end; 6 * Interval() : ...
分类:其他好文   时间:2014-08-09 21:25:19    阅读次数:205
Codeforces Round #260 (Div. 2) A. Laptops(简单题)
Codeforces Round #260 (Div. 2) A. Laptops(简单题)...
分类:其他好文   时间:2014-08-09 18:42:58    阅读次数:197
【转】对于杭电OJ题目的分类
【好像博客园不能直接转载,所以我复制过来了。。】1001 整数求和 水题1002 C语言实验题——两个数比较 水题1003 1、2、3、4、5... 简单题1004 渊子赛马 排序+贪心的方法归并1005 Hero In Maze 广度搜索1006 Redraiment猜想 数论:容斥定理1007 ...
分类:其他好文   时间:2014-08-08 01:52:25    阅读次数:431
HNU 12868 Island (简单题)
题目链接:http://acm.hnu.cn/online/?action=problem&type=show&id=12868&courseid=272解题报告:输入n*m的地图,+表示土地,-表示水,要你求这个海岛的海岸线有多长,扫一遍就可以了。 1 #include 2 const int m...
分类:其他好文   时间:2014-08-07 22:50:45    阅读次数:267
【总结】线段树完整版(未完,不断更新)
很多线段树的题目看上去都是很裸的,而且线段树的算法也就那么几个。但是想做出一道题,还是没有那么简单的。因为,难题都是由简单题组成的。下面是根据NotOnlySuccess大牛整理的题目,以及结合了自己及别人的一些线段树题,其中涵盖了流行OJ的大部分题目。 一、单点跟新|求解区间值 1.hdu1166 敌兵布阵:是一道基础的单点更新,区间求和问题。 2.hdu1754 I Hate I...
分类:其他好文   时间:2014-08-07 13:22:50    阅读次数:212
HDU 2896
AC自动机 简单题 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 const int N=100005; 1...
分类:其他好文   时间:2014-08-06 14:08:31    阅读次数:261
1039条   上一页 1 ... 92 93 94 95 96 ... 104 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!