- 博客(8)
- 收藏
- 关注
原创 给舍友看的自己瞎际霸整理的蓝桥杯练习题单(1)
蓝桥杯训练题单(1) 小y的平面 考察内容:暴力,结构体,排序 难度 2.0/5.0 悬崖 考察内容:思维 难度 0.5/5.0 数数 考察内容:简单递归,全局变量的使用 难度 2.0/5.0 山楂 考察内容:暴力,模拟,思维 难度 2.0/5.0 The Miracle and the Sleeper 考察内容:思维,题目阅读 难度 0.5/5.0 Scenes From a Memory 考察内容:数学,构造,暴力 难度:1.5/5.0 切糕 考察内容:快速幂,模拟 难度 3.5/5.0 ...
2022-03-09 20:30:11
329
原创 codeforces edu round 39 C
C. String Transformation time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a string s consisting of |s| small english letters. In one move you can replace any character of this string to
2021-11-11 22:48:11
618
原创 数据结构实验三 用栈实现进制转换和计算器
在c++中栈已经有stl容器定义过了,在这里面我就不写栈的定义的那部分了(因为太麻烦了) 进制转换非常简单,尤其是这次只要求了十以内进制的转换,我们只需要先输入要转换的进制t,然后输入要转换的数n,每次求n对进制t取模,压入栈中,最后再一直pop到栈为空即可. 代码如下 void Dataturn(int t,int n) { stack<int> s; if(n==0)cout<<0<<endl; else{ while(n){
2021-11-10 13:38:24
864
原创 Codeforces Round #753 (Div. 3)A,B,C,D
昨晚做了俩题(还是俩大水题)电脑没电了。。。还好是小号,不怕掉分 A.Linear Keyboard: 大大大大大水题,存一下s1的位置,然后遍历s2,找距离差的绝对值加一下就可以了 #include<iostream> #include<cmath> using namespace std; int a[26]; void solve() { string s,t; cin>>s>>t; int ans = 0; int l = 26; int l
2021-11-03 14:06:05
185
原创 数据结构实验二 单链表简单操作
概率论课上闲来无事,顺手把数据结构实验写了,代码如下 样例输入; 1 3 5 7 9 0 2 4 6 7 8 0 6 样例输出; 9 7 5 3 1 9 8 7 6 5 4 3 2 1 9 8 7 5 4 3 2 1 #include<iostream>//按序插入 #define ERROR -1 #define exist 1 #define OK 0 using namespace std; //Author Spark typedef struct LNode { int da
2021-11-03 11:19:23
543
3
原创 数据结构实验一 顺序表的插入、删除
最近想了想…决定把自己数据结构实验课的实验报告代码放上来,虽然都是些比较基本的东西,但是万一有能用到的人呢 一、实验目的: 1、 熟悉某种数据结构在计算机上实现的方法。 2、 掌握顺序表的定义、创建、插入、删除、遍历等基本操作的实现。 二、实验要求: 问题描述:已知递增有序的顺序表A,编写算法实现向A中插入或删除一个元素,并保持A的有序性。 实验要求: 1、 数据元素类型均为整型。 2、 若表中已经存在此元素,则不插入 #include<iostream> #include<cstdio&
2021-10-22 20:59:01
4920
2
原创 Harbour.Space Scholarship Contest 2021-2022 (rated, Div. 1 + Div. 2)B. Reverse String
B. Reverse String time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output You have a string s and a chip, which you can place onto any character of this string. After placing the chip, you move it to the ri
2021-07-23 14:59:53
358
1
原创 CF771B Bear and Different Names
Bear and Different Names Time limit1000 ms Memory limit262144 kB In the army, it isn’t easy to form a group of soldiers that will be effective on the battlefield. The communication is crucial and thus no two soldiers should share a name (what would happen
2021-06-01 21:03:19
276
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅