题解列表

筛选

利用指针解决字符数组

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){    string str;    g……

混子代码你值得拥有!

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){    char arr[4] = {0};    for(int i ……

指针遍历,分类记录

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){    string str;    g……

3028: 数的计数(Noip2001) 递推前缀和

解题思路:自然数的个数递推式:h[i]=h[1]+h[2]+...+h[i/2];s[i]为h[i]前缀和,所以h[i]=1+s[i/2](扩展出的自然数包括i本身);计算前缀和s[i]=s[i-1]+h[i];注意事项:参考代码:#include#includeu

结构体之成绩记录(java类)

摘要:多的不说,直接上代码import java.util.Scanner;  class Grade{     int oneSub;     int twoSub;     int thre……

题解 2848: 基因相关性

#includeusingnamespacestd;inte;doublec,z;chara[510],b[510];intmain(){cin>>c;cin>>a>>b;intq=strlen(a);z=q*c;for(inti=1;i=z){cout

水仙花数判断!

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ for (int i = 100; i < 1000; i++) { in……

最大匹配的数学证明

摘要:当数组a是递增排序,而数组b是递减排序时;或者数组a是递减排序,而数组b是递增排序时,结果最大。首先,这两种情况呈现一个对称关系,不妨证明前者——当数组a是递增排序,而数组b是递减排序时,结果最大。证……