B. Preparing Olympiad You have n problems. You have estimated the difficulty of the i-th one as integer ci. Now you want to prepare a problemset for a contest, using some of the problems you've made. A problemset for the contest must consist of at le…
Hie with the Pie Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6436 Accepted: 3470 Description The Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, due to cutbacks, they can affo…
最大联通子数组,这次的题目,我采用的方法为dfs搜索,按照已经取到的数v[][],来进行搜索过程的状态转移,每次对v[][]中标记为1的所有元素依次取其相邻的未被标记为1的元素,将其标记为1,然而,这样会产生很大的子问题重合,所以必须利用dp来进行记忆化搜索,dp为一集合,集合中的元素为已在前面出现过的v[][]的状态, 然而v[][]为一个二维数组,很不方便存入set,所以使用将v[][]的行经行状态压缩,使用位运算,将行存入 long long 型数中,在按列存入vector中 #inclu…
B. Preparing Olympiad Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/550/problem/B Description You have n problems. You have estimated the difficulty of the i-th one as integer ci. Now you want to prepare a problemset for…
Preparing Olympiad time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You have n problems. You have estimated the difficulty of the i-th one as integer ci. Now you want to prepare a problemse…
Description Flip game squares. One side of each piece is white and the other one is black and each piece is lying either it's black or white side up. Each round you flip 3 to 5 pieces, thus changing the color of their upper side from black to white a…
题目链接:https://hihocoder.com/problemset/problem/1334 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Given N words from the top 100 common words in English (see below for reference), select as many words as possible as long as no two words share common letters.…
题目网址:http://acm.hdu.edu.cn/showproblem.php?pid=1198 题目: Farm Irrigation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10132 Accepted Submission(s): 4464 Problem Description Benny has a spac…
Description #define xhxj (Xin Hang senior sister(学姐)) If you do not know xhxj, then carefully reading the entire description is very important. As the strongest fighting force in UESTC, xhxj grew up in Jintang, a border town of Chengdu. Like many god…
SRM 513 2 1000CutTheNumbers Problem Statement Manao has a board filled with digits represented as String[] board. The j-th character of the i-th element of board represents the digit written in cell in row i, column j of the board. The rows are numbe…
借用一下qls翻译过来的题面 现在有 n 个石子,A 和 B 轮流取石子,A先,每次最多可以取 m 个石子,取到最后一个石子的人获胜,但是某个人如果取完石子时候剩余石子数的二进制表示中有奇数个1,这个人就输了给定 n 和 m,问谁赢n<=5e8, m<=50TL 2s 以前我是从来没接触过博弈的 首先普及一下博弈的基本知识.. 必胜态,必败态,以及必胜点与必败点 首先有一个字必须要看清楚,那就是"必"字 是必胜而不是,胜利就行,这个字很关键 如图所示,一个点是p-pos…
Description Christine and Matt are playing an exciting game they just invented: the Number Game. The rules of this game are as follows. The players take turns choosing integers greater than 1. First, Christine chooses a number, then Matt chooses a nu…