14. 最长公共前缀 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 示例 1: 输入:strs = ["flower","flow","flight"] 输出:"fl" 示例 2: 输入:strs = ["dog","racecar","car"] 输出: ...
分类:
其他好文 时间:
2021-02-16 11:50:27
阅读次数:
0
https://www.acwing.com/problem/content/1136/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-15 11:53:26
阅读次数:
0
Problem Description Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer poin ...
分类:
其他好文 时间:
2021-02-10 13:02:09
阅读次数:
0
类型转换 低——————————————————高 byte->short->char->int->long->float->double 由于Java是强类型语言,所以进行有些运算的时候,需要用到类型转换 运算中,不同类型的数据先转化为同一类型,然后进行运算 强制类型转换 (类型)变量名 高——低 ...
分类:
编程语言 时间:
2021-02-10 12:58:59
阅读次数:
0
GEO底层是基于zset来实现的 常用命令:https://blog.csdn.net/liutao43/article/details/110576772 geoadd key 经度 纬度 member : 可以批量添加 geodist key member1 member2 [m/km/fm] ...
分类:
其他好文 时间:
2021-02-10 12:58:44
阅读次数:
0
数据类型 Java是强类型语言,要求变量的使用要严格符合规定,所有变量必须先定义后才能使用 基本类型 数值类型 整数类型(byte,short,int,long) byte占一个字节范围:-128—127 short占两个字节范围:-32768—32767 int占四个字节范围:-214748364 ...
分类:
编程语言 时间:
2021-02-09 12:24:02
阅读次数:
0
A:把多余的步数删掉即可。 #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> pii; const int N = 1e4 + 5; const int M = 1e4 + ...
分类:
其他好文 时间:
2021-02-09 12:16:59
阅读次数:
0
在Java中,8种基本数据类型并不能表示所有的数字。 整数无法表示比byte最小取值还小的,比long最大取值还大的。 浮点数本身有精度, 这就注定有很多数字用基本类型没有办法表示。 BigInteger用来表示不可变的任意精度的整数。BigDecimal用来表示不可变的、任意精度的有符号十进制数。 ...
分类:
其他好文 时间:
2021-02-09 12:02:58
阅读次数:
0
A 一共n个人,去a餐厅的有a人,去b餐厅有b人,两个都去的有c人,求没有去的有多少,如果数据不合理或没去的人数少于1,输出-1 #include<bits/stdc++.h> using namespace std; #define ll long long int main() { int n, ...
分类:
其他好文 时间:
2021-02-09 11:44:03
阅读次数:
0
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; ll a, b, c, d; void solve1() { if (a > 0) { puts("(-inf,inf)"); ...
分类:
其他好文 时间:
2021-02-08 12:05:36
阅读次数:
0