摘要:
1.two sum 思路:一次遍历+hash class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { unordered_map<int,int> a; vector<int> b; for(int i 阅读全文
摘要:
配置maven后,运行命令mvn -v的时候,竟然报错。错误信息如下: Error: JAVA_HOME not found in your environment.Please set the JAVA_HOME variable in your environment to match thel 阅读全文
摘要:
链接:https://ac.nowcoder.com/acm/contest/5477/F来源:牛客网 题目描述 天才程序员菜哭武和石头组队参加一个叫做国际排列计算竞赛 (International Competition of Permutation Calculation, ICPC) 的比赛, 阅读全文
摘要:
1.定义: 对于已知有n个元素的离线数列d,我们可以建立记录它每项与前一项差值的差分数组f:显然,f[1]=d[1]-0=d[1];对于整数i∈[2,n],我们让f[i]=d[i]-d[i-1]。 2.简单性质: (1)计算数列各项的值:观察d[2]=f[1]+f[2]=d[1]+d[2]-d[1] 阅读全文
摘要:
一般这个错误是由密码错误引起,解决的办法自然就是重置密码。 假设我们使用的是root账户。 1.重置密码的第一步就是跳过MySQL的密码认证过程,方法如下: 去mysql安装下的my.ini文件,右键记事本打开,然后找到 [mysqld] ,在[mysqld]后面添加一行 skip-grant-ta 阅读全文
摘要:
The next lecture in a high school requires two topics to be discussed. The ii-th topic is interesting by aiai units for the teacher and by bibi units 阅读全文
摘要:
Andrewid the Android is a galaxy-famous detective. He is now investigating the case of vandalism at the exhibition of contemporary art. The main exhib 阅读全文
摘要:
Vasya has a string ss of length nn. He decides to make the following modification to the string: Pick an integer kk, (1≤k≤n1≤k≤n). For ii from 11 to n 阅读全文
摘要:
Tanya wants to go on a journey across the cities of Berland. There are nn cities situated along the main railroad line of Berland, and these cities ar 阅读全文
摘要:
Description An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the p 阅读全文