自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(32)
  • 问答 (2)
  • 收藏
  • 关注

原创 【SQL编程语言】Datawhale

课堂笔记:目录课堂笔记:初识数据库创建数据库:索引:课后习题:第一题:第二题:第三题:第四题:初识数据库数据库管理系统(Database Management System,DBMS)​:用来管理数据库的计算机系统​创建数据库CREATE DATABASE < 数据库名称 > ;创建表:​CREATE TABLE < 表名 >( < 列名 1> < 数据类型 &g...

2022-05-17 18:22:30 283

原创 ACM(词汇+词组+句子)

ACM(词汇+词组+句子)

2021-12-22 16:43:39 835

原创 问题 I: 例题6-4 矩阵转置

问题 I: 例题6-4 矩阵转置题目描述将一个2行3列的矩阵(二维数组)行列互换,存储到另一个3行2列的矩阵中。要求以整型数据为例来解答。输入输入2行数据,每行3个整数,以空格分隔。输出行列互换后的矩阵,3行,每行2个数据,以空格分隔。样例输入Copy1 2 34 5 6样例输出Copy1 42 53 6#include<iostream>#include<algorithm>using names..

2021-11-20 19:59:13 481

原创 作业比赛编号 : 100000569 - 《算法笔记》2.5小节——C/C++快速入门->数组 问题 F: 例题6-1 逆序输出数组元素

问题 F: 例题6-1 逆序输出数组元素题目描述从键盘上输入10个整数,存储在一个长度为10的整型数组中,要求将输入的10个数逆序输出。如输入为:0,1,2,3,4,5,6,7,8,9 输出为9,8,7,6,5,4,3,2,1,0输入10个整数,以空格分隔输出将输入的10个整数逆序输出,每个数占一行。样例输入Copy0 1 2 3 4 5 6 7 8 9样例输出Copy9876543210#include<i..

2021-11-20 19:08:11 486

原创 作业比赛编号 : 100000569 - 《算法笔记》2.5小节——C/C++快速入门->数组 问题 B: 习题6-5 数组元素逆置

问题 B: 习题6-5 数组元素逆置题目描述将一个长度为10的整型数组中的值按逆序重新存放。如:原来的顺序为1,2,3,4,5,6,7,8,9,0,要求改为0,9,8,7,6,5,4,3,2,1输入从键盘上输入以空格分隔的10个整数。输出按相反的顺序输出这10个数,每个数占一行。样例输入Copy1 2 3 4 5 6 7 8 9 0样例输出Copy0987654321#include<iostream&g...

2021-11-20 16:22:10 486

原创 100000569 - 《算法笔记》2.5小节——C/C++快速入门->数组问题 H: 例题6-3 冒泡排序

问题 H: 例题6-3 冒泡排序题目描述从键盘上输入10个整数,用冒泡法对这10个数进行排序(由小到大)。输入以空格分隔的10个整数输出依次输出排好序的10个整数,每个数占一行。样例输入1 3 5 7 9 2 4 6 8 0样例输出0123456789#include<iostream>#include<algorithm>using namespace std;int main(){

2021-11-20 15:48:41 615

原创 100000569 - 《算法笔记》2.5小节——C/C++快速入门->数组

习题6-4 有序插入题目描述有一个已排好序的数组,要求输入一个数后,按原来排序的规律将它插入到数组中。假设数组长度为10,数组中前9个数(这9个数要求从键盘上输入,输入时要满足自小到大的输入顺序)已经按从小到大进行排序。然后再从键盘上输入一个整数,将此整数插入到前有序的9个数中,使得最终的10个数依然是从小到大有序的。输入第一行输入以空格分隔的9个整数数,要求按从小到大的顺序输入。第二行输入一个整数输出从小到大输出这10个数,每个数一行。样例输入1 1

2021-11-20 15:31:32 83

原创 CF1539A Contest Start

题目描述There arennpeople participating in some contest, they start participating inxxminutes intervals. That means the first participant starts at time00, the second participant starts at timexx, the third — at time2 \cdot x2⋅x, and so on.Durati...

2021-07-13 20:36:06 260

原创 CF1539C Stable Groups

题目描述There arennstudents numerated from11tonn. The level of theii-th student isa_iai​. You need to split the students into stable groups. A group of students is called stable, if in the sorted array of their levels no two neighboring elements di...

2021-07-13 20:16:25 82

原创 CF1512C A-B Palindrome

题目描述You are given a stringssconsisting of the characters '0', '1', and '?'. You need to replace all the characters with '?' in the stringssby '0' or '1' so that the string becomes a palindrome and has exactlyaacharacters '0' and exactlybbcharacte...

2021-07-13 10:03:41 141

原创 CF1541A Pretty Permutations

题目描述There arenncats in a line, labeled from11tonn, with theii-th cat at positionii. They are bored of gyrating in the same spot all day, so they want to reorder themselves such that no cat is in the same place as before. They are also lazy, so ...

2021-07-10 15:22:48 300

原创 CF1512B Almost Rectangle

题目描述There is a square field of sizen \times nn×nin which two cells are marked. These cells can be in the same row or column.You are to mark two more cells so that they are the corners of a rectangle with sides parallel to the coordinate axes.For ex..

2021-07-10 10:30:01 95

原创 P1075 [NOIP2012 普及组] 质因数分解

题目描述已知正整数nn是两个不同的质数的乘积,试求出两者中较大的那个质数。输入格式一个正整数nn。输出格式一个正整数pp,即较大的那个质数。输入输出样例输入 #1复制21输出 #1复制7说明/提示n\le 2\times 10^9n≤2×109NOIP 2012 普及组 第一题#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n;

2021-07-09 18:43:40 53

原创 CF1486B Eastern Exhibition

题目描述You and your friends live innnhouses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Easter..

2021-07-09 17:02:09 80

原创 CF1520C Not Adjacent Matrix

题目描述We will consider the numbersaaandbbas adjacent if they differ by exactly one, that is,|a-b|=1∣a−b∣=1.We will consider cells of a square matrixn \times nn×nas adjacent if they have a common side, that is, for cell(r, c)(r,c)cells(r, c-1)(...

2021-07-05 18:36:57 166

原创 ‎CF1521A Nastia and Nearly Good Numbers

题目描述Nastia has22positive integersAAandBB. She defines that:The integer is good if it is divisible byA \cdot BA⋅B; Otherwise, the integer is nearly good, if it is divisible byAA.For example, ifA = 6A=6andB = 4B=4, the integers2424and7...

2021-06-29 20:24:12 154

原创 洛谷|CF1469A Regular Bracket Sequence

题目描述A bracket sequence is called regular if it is possible to obtain correct arithmetic expression by inserting characters + and 1 into this sequence. For example, sequences (())(), () and (()(())) are regular, while )(, (() and (()))( are not. Let's cal

2021-06-27 20:56:04 138

原创 AcWing第五周周赛|调整数组

给定一个长度为nn的数组a1,a2,…,ana1,a2,…,an。每次操作可以使其中任意一个元素的值增加22。请问,是否可以通过若干次操作使得数组中所有元素的值都相等。输入格式第一行包含整数TT,表示共有TT组测试数据。每组数据第一行包含整数nn。第二行包含nn个整数a1,a2,…,ana1,a2,…,an。输出格式每组数据输出一行结果,能使得数组中所有元素的值都相等则输出YES,否则输出NO。数据范围前三个测试点满足,1≤n≤101≤n≤1...

2021-06-26 19:47:08 227

原创 查找study

题目背景牛油果正在学习英语单词,但他目前只学会了一个单词:study题目描述给你一个字符串S,只包含大小写英文字母,利用这些字母可以拼出n个完整的study(不区分大小写)输入格式字符串S(字符串的长度小于1005)输出格式整数n输入输出样例输入 #1复制ilovestudy输出 #1复制1输入 #2复制butstudydontloveme输出 #2复制1说明/提示 一个s,一个t,一个u,一个d,一个y才能拼出完整的一个

2021-06-14 19:47:12 64

原创 洛谷 P2010 [NOIP2016 普及组] 回文日期

题目描述在日常生活中,通过年、月、日这三个要素可以表示出一个唯一确定的日期。牛牛习惯用88位数字表示一个日期,其中,前44位代表年份,接下来22位代表月 份,最后22位代表日期。显然:一个日期只有一种表示方法,而两个不同的日期的表 示方法不会相同。牛牛认为,一个日期是回文的,当且仅当表示这个日期的8位数字是回文的。现 在,牛牛想知道:在他指定的两个日期之间包含这两个日期本身),有多少个真实存 在的日期是回文的。一个88位数字是回文的,当且仅当对于所有的i ( 1 \le i \le 8)i(

2021-06-14 15:44:37 466

原创 洛谷 P1308 [NOIP2011 普及组] 统计单词数

#include<stdio.h>#include<iostream>#include<cstdio>#include<algorithm>#include<math.h>using namespace std;int main(){ /*大体思路: 1.输入要找的字母 2.输入句子 3.查找字母在句子中出现的次数及位置 */ string s;//字母 string w;//句子 //cin>>s; .

2021-06-13 20:17:33 190

原创 洛谷 P1012 [NOIP1998 提高组] 拼数

题目描述设有nn个正整数a_1 \dots a_na1​…an​,将它们联接成一排,相邻数字首尾相接,组成一个最大的整数。输入格式第一行有一个整数,表示数字个数nn。第二行有nn个整数,表示给出的nn个整数a_iai​。输出格式一个正整数,表示最大的整数输入输出样例输入 #1复制输出 #1复制34331213输入 #2复制47 13 4 246输出 #2复制7424613说明/提示对于全部的测试点,保证...

2021-06-13 10:44:04 242

原创 AcWing 第三周周赛 最短时间

#include<stdio.h>#include<iostream>#include<cstdio>#include<algorithm>#include<math.h>using namespace std;int main(){ int t;//几组测试数据 cin>>t; int n,m;//给定矩阵的大小 int r,c;//目标方格 for(int i=1;i<=t;i++) { ci.

2021-06-12 20:43:45 109

原创 某一个字符在字符串中第一次出现的位置是多少

字符串方法一:用return 0;#include<stdio.h>int main(){ int n=0; scanf("%d",&n); getchar();//吸收换行 自己摸索什么时候用 读字符串的前后使用 char a[100005]; for(int i=0;i<n;i++) { scanf("%c",&a[i]);//cin>>a[i]; } getchar(); char c; scanf("%c".

2021-06-12 18:19:53 456

原创 洛谷 校门外的树

#include<stdio.h>#include<iostream>#include<cstdio>#include<algorithm>#include<math.h>using namespace std;int main(){ int l;//马路长 int m;//区域数目 cin>>l>>m; int a[l+10]={0};//定义一个状态 int u;//区域起始值 int v.

2021-06-12 18:15:07 55

原创 洛谷 等差数列

#include<stdio.h>#include<iostream>#include<cstdio>#include<algorithm>#include<math.h>using namespace std;int main(){ long long int a1,a2,n; cin>>a1>>a2>>n;//注意读入的位置 long long int d=a2-a1;//差值...

2021-06-12 18:14:18 149

转载 简单轮播图

<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>轮播图测试</title> <!-- 外部导入Css文件,链接式 --> <link type="text/css" rel="stylesheet" href="css/slideShow.css"/> </hea.

2021-06-12 18:13:44 167

原创 100000577 - 《算法笔记》3.3小节——入门模拟->图形输出

#include<iostream>#include<algorithm>#include<string.h>#include<math.h>#include<stdio.h>using namespace std;int main(){ int m;//样例数 int h;//高 cin>>m; for(int c=0;c<m;c++ ) { cin>>h; for(int i.

2021-05-30 14:53:35 67

原创 逆序对 矩阵 好事成双 金牌银牌铜牌 发工资

逆序对方法:用到了数组和循环的嵌套#include<iostream>using namespace std;int main(){ int n=0; cin>>n; int a[1005]; for(int i=0;i<n;i++) { cin>>a[i]; } int sum=0;//赋初值 for(int i=0;i<n-1;i++)//最后一个数不用再和别的数进行比较 所以循环到n-1结束 {..

2021-05-17 18:24:13 258

原创 2021-05-16

问题 A: 习题6-4 有序插入#include<stdio.h>int main(){ int a[10];//定义数组时,把数组长度定义为10 for(int i=0;i<9;i++)//[0,9)八个数 { scanf("%d",&a[i]);//读入数组 } int c=0;//定义要插入的数变量为c scanf("%d",&c); for(int i=9;i>0;i--)//9个数 (从a[8]开始从后往前进行比

2021-05-16 14:59:23 53

原创 2021-05-09

PTA_L1_022 奇偶分家一,题目描述:给定两个整数A和B,输出从A到B的所有整数以及这些数的和。输入格式:输入在一行中给出2个整数A和B,其中−100≤A≤B≤100,其间以空格分隔。输出格式:首先顺序输出从A到B的所有整数,每5个数字占一行,每个数字占5个字符宽度,向右对齐。最后在一行中按Sum = X的格式输出全部数字的和X。输入样例:-3 8输出样例: -3 -2 -1 0 1 2 3 4 5 ...

2021-05-09 13:54:25 146 1

原创 2021-05-02

题目:计算时间差##输出格式定义四个变量hour1 minute2 hour2 minute2为什么要用到if语句:如果分钟和分钟直接减去,应该要出现小时借位的情况,比如说1:40和2:10就不能直接分钟和分钟减去#include<bits/stdc++.h>using namespace std;int main(){ int hour1,minute1; int hour2,minute2; scanf("%d %d",&hour1,&

2021-05-02 18:50:49 41

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除