摘要: 高精度加法 —— 模板题 AcWing 791. 高精度加法 // C = A + B, A >= 0, B >= 0 vector<int> add(vector<int> &A, vector<int> &B) { if (A.size() < B.size()) return add(B, A 阅读全文
posted @ 2021-05-09 14:30 limited_Infinite 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 有一个划分为 NN 列的星际战场,各列依次编号为 1,2,…,N1,2,…,N。 有 NN 艘战舰,也依次编号为 1,2,…,N1,2,…,N,其中第 ii 号战舰处于第 ii 列。 有 TT 条指令,每条指令格式为以下两种之一: M i j,表示让第 ii 号战舰所在列的全部战舰保持原有顺序,接在 阅读全文
posted @ 2021-05-01 12:42 limited_Infinite 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间金明自己专用的很宽敞的房间。 更让他高兴的是,妈妈昨天对他说:“你的房间需要购买哪些物品,怎么布置,你说了算,只要不超过N元钱就行”。 今天一早,金明就开始做预算了,他把想买的物品分为两类:主件与附件,附件是从属于某个主件的,下表就是一些主件与 阅读全文
posted @ 2021-04-29 22:06 limited_Infinite 阅读(32) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; const int N = 1001; int dp[N][N]; string str1,str2; int LIS(){ for(int i=1;i<=str1.length();i++) for(int 阅读全文
posted @ 2021-04-27 22:25 limited_Infinite 阅读(31) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; const int N = 110; int dp[N],m,n,bx0; struct Cow{ int ts,tf,sum_sf; }b[N]; bool cmp(Cow a,Cow b){return a 阅读全文
posted @ 2021-04-27 22:08 limited_Infinite 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 1271:【例9.15】潜水员 【题目描述】潜水员为了潜水要使用特殊的装备。他有一个带2种气体的气缸:一个为氧气,一个为氮气。让潜水员下潜的深度需要各种的数量的氧和氮。潜水员有一定数量的气缸。每个气缸都有重量和气体容量。潜水员为了完成他的工作需要特定数量的氧和氮。他完成工作所需气缸的总重的最低限度的 阅读全文
posted @ 2021-04-27 20:17 limited_Infinite 阅读(107) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; const int INF = 0x7fffff; const int N = 1000; int dp[N],n,m,w,v,s,T,command; int main() { ios::sync_with 阅读全文
posted @ 2021-04-25 22:31 limited_Infinite 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 给定一个大小为 n≤106n≤106 的数组。 有一个大小为 kk 的滑动窗口,它从数组的最左边移动到最右边。 你只能在窗口中看到 kk 个数字。 每次滑动窗口向右移动一个位置。 以下是一个例子: 该数组为 [1 3 -1 -3 5 3 6 7],kk 为 33。 窗口位置最小值最大值 [1 3 - 阅读全文
posted @ 2021-04-25 22:01 limited_Infinite 阅读(70) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; const int INF = 0x7fffff; const int N = 201; int dp[N],n,m,w,v,s; int main() { ios::sync_with_stdio(fals 阅读全文
posted @ 2021-04-25 20:00 limited_Infinite 阅读(29) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; const int N = 10000; int n; unsigned long long res=0; struct Bag{ int rnval; int jyval; int weight; }bag 阅读全文
posted @ 2021-04-24 15:54 limited_Infinite 阅读(47) 评论(0) 推荐(0) 编辑
// //返回顶部 //返回顶部按钮