题解列表
1480: 模拟计算器 语言: C++
摘要:解题思路: switch基础语法注意事项: 额参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,ans;……
砝码称重 Dp思想,详细注释
摘要:看到这个题目第一想法是DFS,但DFS显示然耗时太长,就转用Dp的思想
本题Dp的关键在于**考虑到前一个砝码的取舍,利用数组将能称出来的重量置为1,最后统计最后一行的1的数目即可**
```cp……
yolo_mm 用筛法求之N内的素数
摘要:解题思路: 常规筛,把倍数筛去注意事项: i*i 而不是从2倍筛起,比如i=5,如果是两倍则在i=2的时候就已经筛去了参考代码:#include<bits/stdc++.h>using ……
C++题解,重点弄清题意
摘要:解题思路:注意事项:分糖果的时候是全部小朋友同时分的参考代码:#include<iostream>using namespace std;const int N = 100;int n;int a[N……
蓝桥杯2016年第七届真题-密码脱落
摘要:解题思路:将此字符串倒过来,找它与原串的最长公共子序列,最后用原串的长度减去最长公共子序列的长度即可。参考代码:#include <bits/stdc++.h>
using namespace st……
蓝桥杯2015年第六届真题-切开字符串
摘要:```cpp
#include
#include
#include
#include
using namespace std;
string st;
int n,m;
bool d……
1512: 蓝桥杯算法提高VIP-多项式输出
摘要:```cpp
#include
using namespace std;
int main()
{
int n;
cin >> n;
int* p = new int[n+1];……