题意: 给你四个矩形,判断能否从中选出3个组成一个矩形 思路: 1.搜索,如果两个能组成一个新的,则将他们合并,继续搜索 2.暴力判断 最开始没注意到3,一直以为要用4个,WR #include <cstdio> #include <cstring> #include <cstdlib> using namespace std; const int maxn = 10005; const int INF = 0x3f3f3f3f; int x[5]; int y[5];…
题意: 给你B,C,S三种模式,当出现S时直接得分最多300(即perfect) 当是B,C时后面会跟一个数字,当后面的数字是从1开始的连续时,直接得分最多300(即perfect) 问给你一系列,最多能得到多少个pefect 思路: 当出现S时直接+,当出现B或者C时,判断它们后面是否有1,有则+ 做的时间想复杂了- - #include <cstdio> #include <cstring> #include <cstdlib> using namespace st…
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5558 Problem Description Alice wants to send a classified message to Bob. She tries to encrypt the message with her original encryption method. The message is a string S, which consists of Nlowercase let…
House Building Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 145    Accepted Submission(s): 123 Problem Description Have you ever played the video game Minecraft? This game has been one of t…
Chip Factory Time Limit: 18000/9000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 368    Accepted Submission(s): 202 Problem Description John is a manager of a CPU chip factory, the factory produces lots of chips…
Partial Tree Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 228    Accepted Submission(s): 138 Problem Description In mathematics, and more specifically in graph theory, a tree is an undirect…
Dancing Stars on Me Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 186    Accepted Submission(s): 124 Problem Description The sky was brushed clean by the wind and the stars were cold in a bl…
Almost Sorted Array Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 447    Accepted Submission(s): 201 Problem Description We are all familiar with sorting algorithms: quick sort, merge sort,…
Rebuild Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 446    Accepted Submission(s): 113 Problem Description Archaeologists find ruins of Ancient ACM Civilization, and they want to rebuild i…
Count a * b Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 211    Accepted Submission(s): 116 Problem Description Marry likes to count the number of ways to choose two non-negative integers a…