Codeforces Round #712 (Div. 2) A - Déjà Vu 找到个位置对称位置 != 'a' 即可, 找不到且全串不为 'a', 直接放最后 int n, m, _, k, cas; char s[N]; int main() { IOS; for (cin >> _; _ ...
分类:
其他好文 时间:
2021-04-06 14:23:19
阅读次数:
0
1.数组的遍历 通常用双for循环或者foreach循环来遍历二维数组,例如: char arr[][]=new char[4][]; arr[0]=new char[] {'春','江','潮','水','连','海','平'}; arr[1]=new char[] {'海','上','明','月 ...
分类:
编程语言 时间:
2021-04-06 14:14:36
阅读次数:
0
█ 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
#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