duire
duire
全部文章
分类
归档
标签
去牛客网
登录
/
注册
duire的博客
全部文章
(共20篇)
题解 | 数颜色
#include<bits/stdc++.h> using namespace std; int main(){ string s; int a=0,b=0,c=0; cin>>s; for(int i=0;i<s.size();i++){ if(s[i]=...
2025-09-16
0
8
题解 | 买橘子
#include <iostream> #include <queue> #include <vector> using namespace std; //简单背包问题 const int INF = 0x3f3f3f3f; const int MAXV = 10...
2025-09-15
0
11
题解 | 字符串操作
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; string s; cin>>s; for(int i=0;i<m;i++){ ...
2025-08-23
1
16
题解 | 好串
#include<bits/stdc++.h> using namespace std; bool check(string s){ stack<char> st; int len = s.size(); for(int i=0;i<len;i++){ if(...
2025-08-21
0
14
题解 | 【模板】栈的操作
#include<bits/stdc++.h> using namespace std; int main(){ stack<int> s; ios::sync_with_stdio(false); cin.tie(0); int n;cin&...
2025-08-14
1
28
题解 | 两点间距离
/** * struct Point { * int x; * int y; * Point(int xx, int yy) : x(xx), y(yy) {} * }; */ class Solution { public: /** * 代码中的类名、方法名、参数名已...
2025-08-14
0
22
题解 | 矩阵转置
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; int a[n][m]; for(int i=0;i<n;i++){ for(int j=0...
2025-08-12
0
25
题解 | 牛牛学数列5
#include<bits/stdc++.h> using namespace std; int fibonacci(int n){ if(n<=0) return 0; if(n==1) return 1; int a =0,b=1,c; for(int i=2;i<...
2025-08-01
0
18
题解 | 牛牛学数列
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int sum= 0; for(int i=1;i<=n;i++){ if(i%2==0){ sum+=...
2025-07-29
0
26
题解 | 时间转换
#include<iostream> #include<cmath> using namespace std; int main(){ int s; cin>>s; int h,m,a; h = s/3600; m = (s%3600)/60; a =...
2025-07-24
0
20
首页
上一页
1
2
下一页
末页