上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 56 下一页
摘要: 蓝桥杯青少年创意编程 C++组 赛前集训教程包 目录 第 01 课 基本数据类型及运算符 1.1、基本数据类型及类型转换 1.2、变量与常量 1.3、字符与字符串 1.4、运算符 第 02 课 基本程序结构 2.1、顺序结构程序设计 2.2、分支结构程序设计 2.3、循环结构程序设计 第 03 课 阅读全文
posted @ 2023-02-24 16:36 CRt0729 阅读(1793) 评论(0) 推荐(1)
摘要: 描述 有一个火车站,铁路如图所示,每辆火车从A驶入,再从B方向驶出,同时它的车厢可以重新组合。假设从A方向驶来的火车有n节(n≤1000),分别按照顺序编号为1,2,3,…,n。假定在进入车站前,每节车厢之间都不是连着的,并且它们可以自行移动到B处的铁轨上。另外假定车站C可以停放任意多节车厢。但是一 阅读全文
posted @ 2023-02-23 20:14 CRt0729 阅读(52) 评论(0) 推荐(0)
摘要: A 7887:括号匹配 太简单了,不讲 B 7676:括弧匹配检验 #include<bits/stdc++.h> using namespace std; int find(char a[]) { char s[305]; int top = -1; for(int i=0;i<strlen(a) 阅读全文
posted @ 2023-02-23 20:13 CRt0729 阅读(116) 评论(0) 推荐(0)
摘要: #include<iostream> #include<queue> using namespace std; //树结构定义 typedef struct node{ char val; struct node* left; struct node* right; }TreeNode,*Tree; 阅读全文
posted @ 2023-02-20 15:44 CRt0729 阅读(45) 评论(0) 推荐(0)
摘要: 5429数据结构实验:树是否相同 int isSameTree(struct TreeNode* p, struct TreeNode* q)//相同返回1,否则返回0 { if(p==NULL && q==NULL)return 1; if(p==NULL || q==NULL)return 0; 阅读全文
posted @ 2023-02-20 15:09 CRt0729 阅读(116) 评论(0) 推荐(0)
摘要: 5420数据结构实验--二叉树中序遍历(二叉链表存储) void inorder(Bitnode *t) //中序 { if(t->left)inorder(t->left); cout<<" "<<t->val; if(t->right)inorder(t->right); } 5421数据结构实 阅读全文
posted @ 2023-02-20 15:00 CRt0729 阅读(69) 评论(0) 推荐(0)
摘要: 基于链表存储按输入顺序构造的二叉树,输入为-1时结束 #include <stdio.h> #include <stdlib.h> struct TreeNode { int val; struct TreeNode *left,*right; }; struct TreeNode a[520]; 阅读全文
posted @ 2023-02-20 13:40 CRt0729 阅读(40) 评论(0) 推荐(0)
摘要: import tkinter as tk from PIL import ImageTk from aip import AipSpeech import os window = tk.Tk() window.geometry('1050x591') window.resizable(0,0) wi 阅读全文
posted @ 2023-02-19 17:19 CRt0729 阅读(101) 评论(0) 推荐(0)
摘要: 字符串练习 使用string定义一个字符串变量string s; 字符串是单引号的(×) 整行输入字符串有三种方式,分别是gets(),getline(cin,str),cin.getline(str,100) (√) gets是字符数组的输入整行字符串的方式(√) getline(cin,str) 阅读全文
posted @ 2023-02-19 15:33 CRt0729 阅读(50) 评论(0) 推荐(0)
摘要: 栈练习2 请写出使用stack头文件定义一个名称为q的整型栈_stack<int>q;_____ 设当前有栈q,元素x,请写出将元素x入栈push的程序q.push(x); 设当前有栈q,元素x,请写出 出栈pop 的程序q.pop(); 设当前有栈q,元素x,请写出 获取栈顶top 的程序q.to 阅读全文
posted @ 2023-02-18 13:04 CRt0729 阅读(47) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 56 下一页