C语言基础语法知识点 摘要:1. scanf()函数在输入变量的时候后面不要带有空格,否则控制台会出现卡住的现象,会影响格式化的输出。例如:scanf("%d ",&a); 不要这样写。2. scanf()函数和gets()函…… 文章列表 2022年04月29日 1 点赞 0 评论 497 浏览 评分:10.0
精品文章 最长不下降子序列 O(nlogn) 摘要:## 最长不下降子序列 NlogN && 输出序列 用n^2来实现很简单 #include using namespace std; int a[1000…… 文章列表 2022年07月22日 1 点赞 0 评论 678 浏览 评分:10.0
给大家上个贪吃蛇游戏1 摘要:#include<iostream>#include<windows.h>#include<conio.h>#include<ctime>using namespace std;const int C…… 文章列表 2023年05月14日 1 点赞 0 评论 347 浏览 评分:10.0
字串简写(用前缀和优化版本) 摘要:分享一下自己的思路,仅供参考,希望可以帮到大家 ### 算法1(24分) ##### (暴力枚举) O(n^2) ####我们首先不考虑优化,怎么找到答案? ``` #include …… 文章列表 2024年03月30日 0 点赞 1 评论 394 浏览 评分:10.0
十四届蓝桥杯C++B组题目资料分享 摘要:** 我们发现考试时候的难度分布,不一定是越后面越难,这场岛屿个数个人认为最难想到正确做法。但位置居中,靠后的字串简写,个人认为反而没有前面的题难 ** ** 所以个人觉得,考试可以先把能打暴…… 文章列表 2024年04月05日 0 点赞 0 评论 513 浏览 评分:10.0
试除法:找约数(acwing) 摘要://试除法找出所有约数 d为最大公约数(配合gcd一起用) for(int i=1;i<d/i;i++) if(d%i==0) { a[res++]=i; if(i!=d/i…… 文章列表 2024年04月06日 0 点赞 0 评论 432 浏览 评分:10.0
spfa:正权负权边通用最短路 摘要:#include<iostream> #include<cstring> #include<algorithm> #include<queue> using namespace std; …… 文章列表 2024年07月10日 1 点赞 0 评论 253 浏览 评分:10.0
Java之完数的判断(包简单易懂) 摘要:import java.util.*; public class Main { public static void main(String[] args) { Sc…… 文章列表 2024年11月15日 0 点赞 0 评论 299 浏览 评分:10.0
哥德巴赫猜想 摘要:注意所求内容: #include #include // 判断一个数是否为素数 int isprime(int n) { int i, k;…… 文章列表 2024年12月15日 2 点赞 0 评论 994 浏览 评分:10.0
什么希拉里,不行 摘要: #include int main(){ int a[100]; // 定义整数数组用于存储输入的数字 int n,i,j,temp,sum…… 文章列表 2024年12月15日 1 点赞 0 评论 720 浏览 评分:10.0