剑绝尘
剑绝尘
全部文章
分类
题解(2)
归档
标签
去牛客网
登录
/
注册
剑绝尘的博客
全部文章
(共69篇)
题解 | 斐波那契数列
#include <bits/stdc++.h> using namespace std; int main(){ int a = 1,b = 1,c = 1; int n;cin>>n; for(int i = 3;i<=n;i++){ ...
2025-04-25
0
28
题解 | 23年OPPO-a的翻转
#include <bits/stdc++.h> using namespace std; string a,b; int main(){ cin>>a; b = a; reverse(b.begin(),b.end()); cout<...
2025-04-25
0
27
题解 | [CQOI2007]涂色PAINT
#include <bits/stdc++.h> using namespace std; const int N = 60; string str; int dp[N][N]; int main(){ cin>>str; int n = str.size...
2025-04-24
0
27
题解 | 跳台阶
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param number int整型 * @return int整型 */ ...
2025-04-24
0
28
题解 | ranko的手表
#include <bits/stdc++.h> using namespace std; vector<int> v1,v2; int cal(string str){ int res = ((str[0]-'0') * 10 + (str[1]-'0')) *...
2025-04-24
0
24
题解 | 合并回文子串
#include <bits/stdc++.h> using namespace std; const int N = 60; int dp[N][N][N][N]; void solve(){ string str1,str2; cin>>st...
2025-04-23
0
29
题解 | 【模板】循环队列
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 1; int n,q[N],head,top; void push(int x){ if((top+1)%(n+1)==head) cout&l...
2025-04-23
0
16
题解 | 【模板】队列
#include <iostream> using namespace std; const int N = 100001; int n,q[N],h,t; void push(int x){ q[t++] = x; } void pop(){ if(h==t) c...
2025-04-23
0
23
题解 | 小红取数
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e3 + 1; ll n,k,dp[N][N],a[N]; int main(){ cin>>n...
2025-04-22
0
33
题解 | 点击消除
#include <bits/stdc++.h> using namespace std; string str; stack<char> s; int main(){ cin>>str; for(auto x : str){ ...
2025-04-22
0
19
首页
上一页
1
2
3
4
5
6
7
下一页
末页