题解列表
题解 2853: 字符替换
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<string>int main(){ string a; cin >> a;……
蓝桥杯2022年第十三届省赛真题-GCD
摘要:解题思路:a<b时,g(a,b)=g(a,b-a);所以g(a+k,b+k)=g(a+k,b+k-(a+k))=g(a+k,b-a); c=b-a是已知的,只需要找到(a+k)%c==0;相当于a%c……
直接用set解决。。。。。。。。。。。。
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ set<int> a; int n; cin>>n; whi……
城市路(Dijkstra)
摘要:解题思路:注意事项:参考代码:import heapqN=100010e=[0]*Nne=[0]*Nw=[0]*Nh=[-1]*Nindex=0st=[False]*Ndef add(a,b,c): ……
混合背包之只有多重背包
摘要:解题思路:无限==有限,资源是无穷的,背包是有限的注意事项:就是多重背包问题参考代码:#include<iostream>
#include<cmath>
#include<algorithm>
……
自定义函数之字符类型统计
摘要:解题思路:主要是如果满足if就直接continue不用再跑下段代码了可以少些条件注意事项:无参考代码:#include <iostream>#include <string>//要用到getline输……
利用malloc动态分配空间
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<malloc.h>int main(){ int n = 0,sum=0; scanf("%d", &n); int*……
骂骂这题 这题一点都不对劲
摘要:解题思路:在读入完之后加上for (int j = 0; j < 3; j++) for (int i = 0; i < strlen(str[j]); i++) { ……