摘要:
有一个划分为 NN 列的星际战场,各列依次编号为 1,2,…,N1,2,…,N。 有 NN 艘战舰,也依次编号为 1,2,…,N1,2,…,N,其中第 ii 号战舰处于第 ii 列。 有 TT 条指令,每条指令格式为以下两种之一: M i j,表示让第 ii 号战舰所在列的全部战舰保持原有顺序,接在 阅读全文
摘要:
#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 阅读全文
摘要:
#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 阅读全文
摘要:
#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 阅读全文
摘要:
#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 阅读全文
摘要:
#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 阅读全文