DHU
  • 2024-08-13DHU OJ 二维数组 n 层正方形
     思路及代码//n个数s=2n-1/*1111112221123211222111111*///num1row(1,1)->(1,5),(5,1)->(5,5);column(1,1)->(5,1),(1,5)->(5,5)//num2row(2,2)->(2,4),(4.2)->(4,4);column(2,2)->(4,2),(2,4)->(4,4)//num3row(3,3)-
  • 2024-08-13DHU OJ 循环结构 字母图形
    思路及代码去尾加头认为示例给的不好比如输入63输出是ABCBABCBAABCBABCBA还是ABCBABCBADCBEDCFDE呢是后者//inputn,mint1<=<=26#include<iostream>#include<vector>usingnamespacestd;intmain(){intn,m;cin>>n>>m;//solu
  • 2024-08-13DHU OJ 二维数组 杨辉三角
    思路及代码//inputT,int1<=<=20//inputT组n#include<iostream>usingnamespacestd;intmain(){intT;cin>>T;intn;//createn=20杨辉三角int**p=newint*[20];for(inti=0;i<=19;i++){p[i]=new