题解列表

筛选

一次过 简单栈问题

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ stack<char>q; string s; cin >>……

简单for循环

摘要:解题思路:1、根据对称性,只看前n/2行即可               2、发现奇数行和偶数行的规律                奇数行i/2个*-,结尾i/2个-*   中间全是
优质题解

最长上升子序列(贪心+二分)

摘要:线性DP(O(n^2)):[传送门](https://blog.dotcpp.com/a/91960 "动态规划") ------------ ## 贪心+二分(nlogn) ##### *……

c++解题思路

```cpp#includeusingnamespacestd;structtime{intyear;intmonth;intday;};intn;intmain(){structtimest;cin>>st.year;cin>>st.month;cin>>st.day;if(st.year%400=

15行代码写完

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     int a,b;     while(cin>……

LikeWater - 1575: 蓝桥杯算法提高VIP-递归倒置字符数组C++(现在有课,暂时先把答案放这儿,大家先看看,有时间我补充解释说明)

```cpp#includeusingnamespacestd;intN;//完成一个递归程序,倒置字符数组。并打印实现过程//递归逻辑为://当字符长度等于1时,直接返回//否则,调换首尾两个字符,在递归地倒置字符数组的剩下部分char*Inversion(chars[],

没学过C++的都可以看懂

摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cmath>using namespace std;int main() { int n; cin >> n; ……

C++版简单4位数

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main() { int n, x; int m = 0; cin >> n; fo……

c++解题思路

```cpp#include#defineN10usingnamespacestd;intmain(){inta[N];intb=0;for(inti=0;i>a[i];}for(inti=0;i