文章列表
蓝桥杯2024年第十五届C/C++大学A组省赛真题-训练士兵
摘要:
**题目描述**
在蓝桥王国中,有 n 名士兵,这些士兵需要接受一系列特殊的训练,以提升他们的战斗技能。对于第 i 名士兵来说,进行一次训练所需的成本为 pi 枚金币,而要想成为顶尖战士,他……
单词统计并排序(用到sort函数并实现自定义排序:结构体排序)
摘要:```cpp
#include
#include
#include
using namespace std;
struct word {
string w;
int size……
git推送冲突问题解决
摘要:在最近项目中遇到了git推送冲突的问题,产生这个问题一般有以下几种情况:1、其他人在我准备推送更改的同时,已经向远程仓库推送了与我本地修改相关的内容。2、我在本地修改的文件,与远程仓库中的文件在同一位……
蓝桥杯2024年第十五届省赛真题-好数
摘要:#include <bits/stdc++.h>
using namespace std;
int judge1(int num)
{
int n[9];
int f = 1……
蓝桥杯2023年第十四届省赛真题-更小的数
摘要:#include <bits/stdc++.h>
using namespace std;
string str;
int main()
{
ios::sync_with_std……
i++与++i,do-while循环与while循环
摘要:(1)do-while i++:#include<stdio.h>int main(){ int i=0; do { printf("count %d\n",i); ……
c++常见数据类型的范围
摘要:代码:#include<bits/stdc++.h>
using namespace std;
int main()
{
cout<<numeric_limits<short>::max()……
递归算法 设R={r1,r2,…,,rn},令Ri=R-{ri}。集合X中的元素的全排列记为Perm(X),则(ri)Perm(X)表示在全排列Perm(X)的每一个排列前加上前缀ri得
摘要:#include <stdio.h>
#include <string.h>
void swap(char *x, char *y) //交换
{
char temp;
t……
贪心算法 题目描述: 有许多木桩需要用机器处理,每个木桩有一个长度li和重量wi。给机器安装第一个木桩时需要1分钟,之后每次换木桩时,若新木桩的长度li’<=li,重量wi&rs
摘要:#include <stdio.h>int main() { int T; scanf("%d", &T); while (T--) { int n; s……