https://pintia.cn/problem-sets/13/problems/408 1 #include <stdio.h> 2 int main(void) 3 { 4 int lower, upper; 5 int fahr; 6 double celsius; 7 8 scanf(" ...
分类:
其他好文 时间:
2020-02-02 21:50:18
阅读次数:
76
"传送门" 题意: 给两个字符串$s,t$ $z$为一个空串 问对$s$进行多少操作能将$z$变成$t$ 每次操作为,选s的一些字串(可以不连续,但顺序不能乱),让把这个字串加到Z的后面 输出最少操作的次数,如果$z$不能变成$t$,输出 1 思路: 把字符串放入vector,或者二维数组里,因为只 ...
分类:
其他好文 时间:
2020-02-02 01:31:56
阅读次数:
68
Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, you should return the largest palindro ...
分类:
编程语言 时间:
2020-02-01 10:47:36
阅读次数:
78
1029 旧键盘 (20分) https://pintia.cn/problem-sets/994805260223102976/problems/994805292322111488 #include <iostream> #include <cctype> using namespace std ...
分类:
其他好文 时间:
2020-01-31 23:04:56
阅读次数:
73
def myfont(): name = input("输入你的名字:(only English words) \t") length = len(name) for x in range(0, length): c = name[x] c = c.upper() if (c == "A"): pr ...
分类:
其他好文 时间:
2020-01-31 14:11:02
阅读次数:
69
妈耶,,,被B题卡到哭,C题一发就过了。。。 字符串问题。首先用vector记录每个字符出现的位置,然后对字符串t的每个字符,用二分查找函数查找,注意用upper_bound查找,对于字符i,首先用变量pre记录第i-1个字符的位置。然后第i个字符的位置只能比 第i-1个字符位置大,所以用二分查一下 ...
分类:
其他好文 时间:
2020-01-30 22:42:45
阅读次数:
82
1 #include <iostream> 2 #include <cstdio> 3 #include <set> 4 5 // 仿函数的原型 6 //struct greaters 7 //{ 8 // bool operator()(const int &left,const int &rig ...
分类:
其他好文 时间:
2020-01-30 12:56:05
阅读次数:
74
RGB色彩空间 常见的色彩空间 色彩空间的转换 常见的两个颜色转换 HSV与RGB YUV与RGB inRange方法 函数参数: 第一个参数:是原图 第二个参数:lower_red指的是图像中低于这个lower_red的值,图像值变为0 第三个参数:upper_red指的是图像中高于这个upper ...
分类:
编程语言 时间:
2020-01-27 22:03:20
阅读次数:
102
1. 传统方法的缺点 2. 单元测试 package cal //一个被测试函数 func addUpper(n int) int { res := 0 for i := 1; i <= n - 1; i++ { res += i } return res } //求两个数的查 func getSu ...
分类:
其他好文 时间:
2020-01-27 09:13:24
阅读次数:
61
一. 系统内置函数 1)查看系统自带的函数 hive> show functions; 2)显示自带的函数的用法 hive> desc function upper; 3)详细显示自带的函数的用法 hive> desc function extended upper; 二. 自定义函数 1.分类 1 ...
分类:
其他好文 时间:
2020-01-26 11:39:32
阅读次数:
67