题解列表

筛选

数组来做,优化了算法的

摘要:解题思路:注意事项:参考代码:#include#includeint main(){ int i,j,N,a[1000],b[1000],x,sum; scanf("%d",&N); for(i=6;……

编写题解 2920: 分数线划定

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>struct volun{    int k;    int s;};int main(){    in……

矩阵的对角线之和(简单C++)

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     int a[5][5],i,s=0,j;   ……

  编写题解 2919: 奖学金

摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct student {    int id;    int yu;    int shu;    int Eng;};int ……

The 3n + 1 problem(c语言代码) - 解决33%的错误

摘要:注意事项:i,j的输入大小顺序不确定因此要比较i,j并交换i,j要提前打印,如果输入时i>j,交换后,i,j的值就交换了,打印时就出错n = n*3+1可能导致溢出,因此直接将i,j,n全设为long……