(C语言)题解 2216: 蓝桥杯算法训练-加法运算 摘要:#include<stdio.h>void(GetTwoInts(int *a,int *b)){ int temp; temp=*a; *a=*b; *b=temp;} int main() { …… 文章列表 2023年12月27日 0 点赞 0 评论 120 浏览 评分:0.0
题目 2794: 求平均年龄 摘要:``` #include using namespace std; int main() { double a,c=0; cin >>a; for (int i = 0; i < a…… 文章列表 2023年12月27日 0 点赞 0 评论 117 浏览 评分:0.0
素数(自存) 摘要:#include <stdio.h>int main(){ int a,n; scanf("%d",&n); for(a=2;a<n;a++)//遍历比n小的数字 { if(n%a==0) …… 文章列表 2024年01月03日 0 点赞 0 评论 107 浏览 评分:0.0
星期判断机 摘要:#include <bits/stdc++.h>using namespace std;int main(){ int a; cin >>a; switch(a) { c…… 文章列表 2024年01月06日 0 点赞 0 评论 115 浏览 评分:0.0
第二次训练--D问题(C++解析) 摘要:# D问题解析 ## 前言 这道题考察了递推和高精度,但是高精度只是点缀。可能很多小伙伴通过java、python语言绕过了高精度。这样做没什么意义。因为java、python组真考高精度,难点永…… 文章列表 2024年01月24日 0 点赞 0 评论 723 浏览 评分:0.0
双指针查找字符串中包含几个单词 摘要:#include<iostream> using namespace std; int main(void) { string s; getline(cin,s); //有空格输入 …… 文章列表 2024年01月24日 0 点赞 0 评论 169 浏览 评分:0.0
双指针 最长连续不重复子序列 摘要:#include<iostream> using namespace std; const int N=10010; int a[N],b[N],n,sum=0; int main(void)…… 文章列表 2024年01月24日 0 点赞 0 评论 263 浏览 评分:0.0
离散化(acwing) 摘要:适用:值域跨度很大,但所用的很稀疏 //一个无限长坐标轴 在某个位置加上一个数(n次) 询问从l到r之间共加了多少(询问m次) #include<iostream> #include<vect…… 文章列表 2024年01月27日 0 点赞 0 评论 126 浏览 评分:0.0
P1548 [NOIP1997 普及组] 棋盘问题 摘要:#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int zz=…… 文章列表 2024年01月28日 0 点赞 0 评论 106 浏览 评分:0.0
区间合并(acwing) 摘要://给定多个区间 求有几个区间(将两重合区间合并成一个区间) #include<iostream> #include<algorithm> #include<vector> using na…… 文章列表 2024年01月28日 0 点赞 0 评论 142 浏览 评分:0.0