![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字符串
Allianzcortex
这个作者很懒,什么都没留下…
展开
-
hdu_1251_统计难题_字典树
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1251做到这道题的时候突然想起某乎上的一个问题:如何评价360面试官对trie树的评价?只能说想象一下一个汉字后面可能接的数目,即使以10个数字作为基准,那花费的空间也是不敢想象的。代码如下:#include#include#include#includeusing namespa原创 2015-01-01 16:18:18 · 444 阅读 · 0 评论 -
hdu_1048_字符串_水
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1048是在是不能再水的一道题,适合热身练习用。注意它每次都是读取一行,用c语言的gets也可以。顺便放一下常用的asc码:0—9: 48—57A—Z: 65—90a—z: 97—122代码如下:#include#include#include#include原创 2015-01-01 11:10:42 · 452 阅读 · 0 评论 -
hduing1501_判断合并_dfs_数组
#include#include#include#includeusing namespace std;const int maxn=1000;char s1[300],s2[300],s3[600]; //数组的长度int len1,len2,len3;int visit[maxn][maxn];int dfs(int i,int j,int k){ if(visi原创 2015-01-02 10:52:27 · 435 阅读 · 0 评论 -
leetcode_stringc
1. 先提供一个string里最受欢迎的题目,https://leetcode.com/problems/reverse-words-in-a-string/151 reverse words in a string参加自己之前所写的博客,AC代码如下:class Solution {public: void reverseWords(string &s) {原创 2015-05-04 22:01:28 · 499 阅读 · 0 评论 -
leetcode_数组_相关内容_1(48-66-88-118-119)
对于自己之前写的内容应该做更好的梳理。1. 48:Rotate Image 传送门:https://leetcode.com/problems/rotate-image/ 大意:给出n*n的一个矩形,进行90‘顺时针旋转。题解:1.思路:对矩阵,第i行j列的元素逆转过来后就是另一个矩阵的j行n-i列。AC代码如下:class Solution {public: vo原创 2015-05-15 19:00:34 · 516 阅读 · 0 评论