题目意思: 给n个士兵排队,每个士兵三种G.R.P可选,求至少有m个连续G士兵,最多有k个连续R士兵的排列的种数. 原题 Attack on Titans Time Limit: 2 Seconds Memory Limit: 65536 KB Over centuries ago, mankind faced a new enemy, the Titans. The difference of power between mankind and their newfound enemy w…
有n张牌,求出至少有k张牌连续是正面的排列的种数.(1=<k<=n<=100) Toss is an important part of any event. When everything becomes equal toss is the ultimate decider. Normally a fair coin is used for Toss. A coin has two sides head(H) and tail(T). Superstition may work in…
题目链接:点击进入 题目分析: 简单的组合背包模板题,但是递推的同时要刷新这种情况使用了哪些物品 ac代码: #include<bits/stdc++.h> using namespace std; ],zhu[],t[]; struct student { int s; int number; ]; }f[][]; int main() { std::ios::sync_with_stdio(false); int m,v,n;//m总重量,v总阻力,n物品数 cin>>m>…
题目:假如有A,B两个人,在一个m*n的矩阵,然后A在(1,1),B在(m,1),A要走到(m,n),B要走到(1,n),两人走的过程中可以捡起格子上的数字,而且两人速度不一样,可以同时到一个点(哪怕这个点离A很近,离B很远),现在A,B起码相遇于一个点点,相遇点的数字A,B都得不到,求最后A,B总数字之和的最大值 B. Working out Summer is coming! It's time for Iahub and Iahubina to work out, as they both…