【codeforces 239B】Easy Tape Programming】的更多相关文章

[题目链接]:http://codeforces.com/contest/239/problem/B [题意] 给你一个长度为n的字符串,只包括'<">'以及数字0到9; 给你q个区间(n和q都小于等于100) 然后让你在这q个区间里面做一些操作; 有一个指针int,指向当前操作的位置,还有一个方向的int; 表示这个指针它要移动的方向; 每次对一个位置进行操作; 如果该位置是数字; 则把这个数字输出,然后这个数字递减1; 如果数字小于0了,则把它删掉; 然后把指针往方向int的方向…
[链接] 我是链接,点我呀:) [题意] 让你将一个字符串删掉一些字符. 使得字符串中不包含子序列"hard" 删掉每个字符的代价已知为ai 让你求出代价最小的方法. [题解] 设dp[i][j]表示前i个字符,已经和"hard"匹配前j个的最小花费. 对于dp[i][j] 对s[i+1]分类讨论 ①s[i+1]不删 那么有两种情况 第一种:s[i+1]和"hard"的第j+1个字符匹配 第二种:..xxxxx不匹配 则分别转移到dp[i+1][…
[codeforces 415D]Mashmokh and ACM 题意:美丽数列定义:对于数列中的每一个i都满足:arr[i+1]%arr[i]==0 输入n,k(1<=n,k<=2000),问满足[数列长度是k && 数列中每一个元素arr[i]在1~n之间 && 数列中元素可以重复]的数列有多少个?结果对10^9+7取余 解题思路:dp[i][j]表示长度是j,最后一位是i的种数 if(kk%i==0) dp[kk][j+1]+=dp[i][j] #inc…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output After overcoming the stairs Dasha came to classes. She needed to write a password to begin her classes. The password is a string of length n whi…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output After overcoming the stairs Dasha came to classes. She needed to write a password to begin her classes. The password is a string of length n whi…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output When Xellos was doing a practice course in university, he once had to measure the intensity of an effect that slowly approached equilibrium. A g…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Vladik is a competitive programmer. This year he is going to win the International Olympiad in Informatics. But it is not as easy as it sounds:…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Professor GukiZ likes programming contests. He especially likes to rate his students on the contests he prepares. Now, he has decided to prepare…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output This is an interactive problem. In the interaction section below you will find the information about flushing the output. The New Year tree of h…
time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard output Anton likes to play chess. Also, he likes to do programming. That is why he decided to write the program that plays chess. However, he finds the…