题目描述: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note: 要完成的函数 ...
分类:
其他好文 时间:
2018-05-12 02:42:33
阅读次数:
169
题目描述: Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to ...
分类:
其他好文 时间:
2018-05-11 12:45:05
阅读次数:
172
J 小白兔小灰兔 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K Spec ...
分类:
其他好文 时间:
2018-05-07 21:02:46
阅读次数:
227
Brackets Sequence Brackets Sequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 33911 Accepted: 9816 Special Judge Description Let us d ...
分类:
其他好文 时间:
2018-05-06 01:37:54
阅读次数:
177
#include #include int judge(int a[]); int main() { int a[10] = {0}; if(judge(a)==1) { printf("相等\n"); } else { printf("不相等\n"); } return 0; } int judg... ...
分类:
编程语言 时间:
2018-05-05 22:15:59
阅读次数:
229
题目链接: http://exercise.acmcoder.com/online/online_judge_ques?ques_id=3362&konwledgeId=40 解题思路: 正向求解很难。考虑如果给定一个长度,判断这个长度x是否符合要求是很简单的,只需要贪心对于每个1划分一个长度x的段 ...
分类:
其他好文 时间:
2018-05-05 01:04:47
阅读次数:
180
1. 多态是什么(语义上什么意思,语法上怎么实现)?虚函数是什么?虚函数底层怎么实现的? 多态简单来说就是“一个接口,多种方法”,程序在运行时才决定具体调用哪一个函数,因此程序运行有不同的状态,称为多态、语法上通过虚函数来实现。 虚函数即声明时加了vitual关键字的函数,告知编译器不要在编译阶段将 ...
分类:
编程语言 时间:
2018-05-02 23:52:03
阅读次数:
208
题目链接: http://exercise.acmcoder.com/online/online_judge_ques?ques_id=3369&konwledgeId=40 解题思路: 按照题意把每个出现的字符替换掉就可以了。 ...
分类:
其他好文 时间:
2018-05-02 02:59:37
阅读次数:
157
题目链接: http://exercise.acmcoder.com/online/online_judge_ques?ques_id=3347&konwledgeId=40 解题思路: 直接求出所有的最短路,以及最短路上的特征距离。 ...
分类:
其他好文 时间:
2018-05-02 02:40:06
阅读次数:
141
题目链接: http://exercise.acmcoder.com/online/online_judge_ques?ques_id=3368&konwledgeId=40 解题思路: 首先,我们检查一下一个字符串是否在另一个字符串当中出现过,可以把出现过的字符串全都删除。 然后对于互相不包含的字 ...
分类:
其他好文 时间:
2018-05-02 02:36:14
阅读次数:
191