nogodmessi
nogodmessi
全部文章
分类
题解(6)
归档
标签
去牛客网
登录
/
注册
nogodmessi的博客
全部文章
(共6篇)
题解 | #继续畅通工程#
#include using namespace std; #include const int MAXN=100; int father[MAXN]; struct Edge{ int from; int to; int length; int state; bool operator<...
C++
2022-03-20
0
371
题解 | #多项式的值#
#include using namespace std; const int MAXN=11; int main(){ int m; cin>>m; while(m--){ int number; cin>>number; int arr[MAXN]; for(int i...
C++
2022-03-16
0
351
题解 | #点菜问题#
#include using namespace std; const int MAXN = 1000 + 10; int weight[MAXN]; int value[MAXN]; int dp[MAXN][MAXN]; int main() { int n, m; /...
C++
2022-03-14
0
336
题解 | #数字之和#
#include using namespace std; void sum(int n){ int sum =0; while(n){ sum+=n%10; n/=10; } cout<<sum<<" "; } int main(){ int n; while(cin>...
C++
2022-03-10
0
333
题解 | #查找#
//二分查找需要先使排列元素有序 #include #include #include using namespace std; const int Maximum = 100; int array[Maximum]; bool Binary_Search(int n,int target){ in...
C++
2022-03-10
0
357
题解 | #最大上升子序列和#
#include using namespace std; const int MAXN=1000+10; int main(){ int n; //数组的大小 int arr[MAXN]; //输入数组 int sum[MAXN]; ...
C++
2022-03-10
0
364