█ 0.代码函数: ○ 0.1 边界 Integer.MAX_VALUE int[] preorder ==> preorder == null || preorder.length == 0 char[][] board ==> board == null int[][] matrix ==> ( ...
分类:
其他好文 时间:
2021-04-06 14:10:55
阅读次数:
0
对于给定的一个字符串,统计其中数字字符出现的次数。 类和函数接口定义: 设计一个类Solution,其中包含一个成员函数count_digits,其功能是统计传入的string类型参数中数字字符的个数并返回。 裁判测试程序样例: #include <cstdlib> #include <cstdio ...
分类:
其他好文 时间:
2021-04-05 12:37:04
阅读次数:
0
#include<bits/stdc++.h> using namespace std; int main(){ char s[105]; int x; scanf("%s%d",&s,&x); int ans=0; int len =strlen(s); for(int i=0;i<len;i++ ...
分类:
其他好文 时间:
2021-04-05 12:35:59
阅读次数:
0
#include<bits/stdc++.h> using namespace std; int main(){ char s[105]; int x,y; while(scanf("%d %d",&x,&y)!=EOF){ scanf("%s",s); int ans=0; int len=str ...
分类:
其他好文 时间:
2021-04-05 12:35:26
阅读次数:
0
难度 medium 给定两个字符串 text1 和 text2,返回这两个字符串的最长 公共子序列 的长度。如果不存在 公共子序列 ,返回 0 。 一个字符串的 子序列 是指这样一个新的字符串:它是由原字符串在不改变字符的相对顺序的情况下删除某些字符(也可以不删除任何字符)后组成的新字符串。 例如, ...
分类:
其他好文 时间:
2021-04-05 12:24:42
阅读次数:
0
1.链接代码 char* my_strcat(char* dist, const char* src) { if (dist == nullptr || src == nullptr) { return dist; } char* cp = dist; while (*cp != '\0') { + ...
分类:
其他好文 时间:
2021-04-05 11:42:36
阅读次数:
0
OpenCV中使用forEach进行并行像素访问 在本教程中,我们将比较Mat类的forEach方法的性能和访问和转换OpenCV中像素值的其他方式。 我们将展示如何使用at方法甚至高效地使用指针算法,forEach比使用at方法快得多。 OpenCV中有隐藏的宝石,有时不是很知名。 其中一个隐藏的 ...
分类:
其他好文 时间:
2021-04-02 13:33:57
阅读次数:
0
#include <stdio.h> int main(){ int n,sum,x,y; sum=1; x=1; y=2; scanf("%d",&n); do { sum +=y; y=y*2; x++; }while(x<=n); printf("n=%d时,sum=%d\n",n,sum); ...
分类:
其他好文 时间:
2021-04-02 13:12:27
阅读次数:
0
#include <stdio.h> int main() { int num; scanf("%d", &num); printf("2049%04d\n", num); scanf("%d", &num); printf("2049%04d\n", num); scanf("%d", &num) ...
分类:
其他好文 时间:
2021-04-02 13:06:58
阅读次数:
0
1.main.cpp #include "themewidget.h" #include <QtWidgets/QApplication> #include <QtWidgets/QMainWindow> int main(int argc, char *argv[]) { QApplication ...
分类:
其他好文 时间:
2021-04-01 13:27:59
阅读次数:
0