acm
Katapeltes
这个作者很懒,什么都没留下…
展开
-
暑假集训--训练2 DFS
A - N皇后问题 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatusDescription在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种原创 2016-07-22 18:26:04 · 364 阅读 · 0 评论 -
HDU 1010 Tempter of the Bone 搜索 奇偶剪枝
Tempter of the Bone Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u SubmitStatusDescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However,原创 2016-07-22 21:59:08 · 236 阅读 · 0 评论 -
POJ 3620 Avoid The Lakes dfs
Avoid The Lakes Time Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %lld & %llu SubmitStatusDescriptionFarmer John’s farm was flooded in the most recent storm, a fact only aggravated by the原创 2016-07-22 22:01:28 · 277 阅读 · 0 评论 -
CSU-ACM2016暑假集训比赛2
A - 究竟能吃多久? Time Limit:2000MS Memory Limit:524288KB 64bit IO Format:%I64d & %I64u SubmitStatusDescriptionA gourmet came into the banquet hall, where the cooks suggested n dishes for guests. T原创 2016-07-23 21:33:25 · 340 阅读 · 0 评论 -
HDU 1445 Ride to School 贪心
Ride to School Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u SubmitStatusDescriptionMany graduate students of Peking University are living in Wanliu Campus, which is 4.5原创 2016-07-23 21:36:17 · 444 阅读 · 0 评论 -
HDU 1050 Moving Tables 求最大重复次数
Moving Tables Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u SubmitStatusDescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose原创 2016-07-23 21:38:14 · 215 阅读 · 0 评论 -
HDU 2298 Toxophily 二分 推公式
Toxophily Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u SubmitStatusDescriptionThe recreation center of WHU ACM Team has indoor billiards, Ping Pang, chess and bridge, to原创 2016-07-24 20:06:43 · 326 阅读 · 0 评论 -
HDU 3400 Line belt 嵌套三分搜索
Line belt Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u SubmitStatusDescriptionIn a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhg原创 2016-07-24 20:08:18 · 271 阅读 · 0 评论 -
POJ 3737 UmBasketella 三分搜索
UmBasketella Time Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %lld & %llu SubmitStatusDescriptionIn recent days, people always design new things with multifunction. For instance, you can原创 2016-07-24 20:09:35 · 438 阅读 · 0 评论 -
HDU 1045 Fire Net dfs
Fire Net Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u SubmitStatusDescriptionSuppose that we have a square city with straight streets. A map of a city is a square board原创 2016-07-24 21:10:27 · 340 阅读 · 0 评论 -
HDU 1312 Red and Black 红与黑 搜索 dfs bfs
Red and Black Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 17114 Accepted Submission(s): 10411Problem DescriptionThere is a rectangular原创 2016-07-21 20:23:59 · 412 阅读 · 0 评论 -
POJ 1365 Prime Land 素数
Prime Land Time Limit: 1000MS Memory Limit: 10000KB 64bit IO Format: %lld & %llu SubmitStatusDescription Everybody in the Prime Land is using a prime base number system. In this system, e原创 2016-07-26 16:15:04 · 489 阅读 · 0 评论 -
CSU-ACM2016暑假集训比赛3
A - A Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeHDU 1242 Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The pri原创 2016-07-26 16:19:19 · 418 阅读 · 0 评论 -
POJ 1426 Find The Multiple
Find The Multiple Time Limit: 1000MS Memory Limit: 10000KB 64bit IO Format: %lld & %llu SubmitStatusDescription Given a positive integer n, write a program to find out a nonzero multiple原创 2016-07-26 17:24:15 · 271 阅读 · 0 评论 -
HDU 1069 Monkey and Banana DP
Monkey and Banana Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u SubmitStatusDescription A group of researchers are designing an experiment to test the IQ of a mo原创 2016-07-27 17:17:54 · 522 阅读 · 0 评论 -
CSU 1775 悲催的移寝 贪心
悲催的移寝 Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu SubmitStatusDescription 对于csuxushu来说,能够在CSU(California State University)上学是他一生的荣幸,而换校区搬寝室则是他最大的不幸。顺利通过省赛选拔,开心的c原创 2016-07-27 17:19:20 · 422 阅读 · 0 评论 -
CSU 1765 简单shell 模拟
简单shell Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu SubmitStatusDescription shell是一个非常好用的软件用来管理您的PC。写一个简单的shell框架支持简单的ls,pwd,cd功能。ls是显示当前目录存在的文件,pwd是显示当前路径,cd是移动原创 2016-07-27 17:20:13 · 391 阅读 · 0 评论 -
Codeforces 691C. Exponential notation 模拟
B - Exponential notation Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description You are given a positive decimal number x.Your task is to convert it原创 2016-07-27 17:21:30 · 415 阅读 · 0 评论 -
HDU 1789 Doing Homework again 贪心
F - Doing Homework again Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description zichen has just come back school from the 30th ACM/ ICPC. Now he has a原创 2016-07-27 17:22:37 · 292 阅读 · 0 评论 -
HDU 4864 Task 贪心 难题
D - Task Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Today the company has m tasks to complete. The ith task need xi minutes to complete. M原创 2016-07-27 17:23:25 · 585 阅读 · 0 评论 -
HDU 4296 Buildings 贪心
Buildings Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u SubmitStatusDescription Have you ever heard the story of Blue.Mary, the great civil engineer? Unlike Mr原创 2016-07-30 08:49:48 · 336 阅读 · 0 评论 -
CSU-ACM2016暑假集训比赛4
C - C Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeCodeForces 621B Description Today, Wet Shark is given n bishops on a 1000 by 1000 grid. Both原创 2016-07-30 08:51:29 · 291 阅读 · 0 评论 -
暑假集训-训练6 动态规划初步
A - 爬楼梯 Time Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu SubmitStatus Description 小时候我们都玩过爬楼梯的游戏:两人猜拳,赢了可向上爬一级,谁先到最高级则获胜。作为大学生,我们应该玩一个更有水平的游戏。 现在一个人要上n级楼梯,每一步可以选择上一级或者上两原创 2016-07-30 08:55:53 · 591 阅读 · 0 评论 -
对拍程序
随即数据生成 根据题目的输入格式生成例:#include<stdio.h>#include<string>#include<cstring>#include<queue>#include<algorithm>#include<functional>#include<vector>#include<iomanip>#include<math.h>#include<iostream>原创 2016-07-30 17:14:41 · 282 阅读 · 0 评论 -
CSU-ACM2016暑假集训比赛5
A - A HDU 1078 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeHDU 1078 Description FatMouse has stored some cheese in a city. The city can be co原创 2016-07-30 18:11:31 · 295 阅读 · 0 评论 -
Cf Edu 15 C Cellular Network 二分
http://codeforces.com/problemset/problem/702/C二分搜索与每个城市最近的信号塔取能满足所有城市的最小值#include<stdio.h>#include<string>#include<cstring>#include<queue>#include<algorithm>#include<functional>#include<vector>原创 2016-08-15 20:46:30 · 328 阅读 · 0 评论 -
CodeForces 635C XOR Equation 数学 公式
#include<stdio.h>#include<string>#include<cstring>#include<queue>#include<algorithm>#include<functional>#include<vector>#include<iomanip>#include<math.h>#include<iostream>#include<sstream>#i原创 2016-08-15 20:47:11 · 349 阅读 · 0 评论 -
HDU 1754 I Hate It 线段树入门
//读取字符的时候要用字符数组 单个字符会WA#include<stdio.h>#include<string>#include<cstring>#include<queue>#include<algorithm>#include<functional>#include<vector>#include<iomanip>#include<math.h>#include<iostrea原创 2016-08-15 20:47:41 · 306 阅读 · 0 评论 -
HDU 1698 Just a Hook 线段树 区间更新 惰性标记
#include<stdio.h>#include<string>#include<cstring>#include<queue>#include<algorithm>#include<functional>#include<vector>#include<iomanip>#include<math.h>#include<iostream>#include<sstream>#i原创 2016-08-15 20:48:10 · 330 阅读 · 0 评论 -
CodeForces 706D Vasiliy's Multiset 字典树
#include<stdio.h>#include<string>#include<cstring>#include<queue>#include<algorithm>#include<functional>#include<vector>#include<iomanip>#include<math.h>#include<iostream>#include<sstream>#i原创 2016-08-15 20:48:30 · 354 阅读 · 0 评论 -
CodeForces 476B Dreamoon and WiFi 数学 概率 DP
http://codeforces.com/problemset/problem/476/B//数学解法:统计两个串中各字符的个数,判断各需要添加几个.//因为只有两种(+和-),所以只要判断一种(我判断的是+)就可以确定答案了.//Ans=C(c,a)/pow(2,c)#include<stdio.h>#include<string>#include<cstring>#include<原创 2016-08-15 20:48:59 · 420 阅读 · 0 评论 -
CodeForces 680B Bear and Finding Criminals 简单模拟
题目链接:http://codeforces.com/problemset/problem/680/B//简单的模拟#include<stdio.h>#include<string>#include<cstring>#include<queue>#include<algorithm>#include<functional>#include<vector>#include<iomanip原创 2016-08-15 20:49:34 · 270 阅读 · 0 评论 -
CodeForces 550C Divisibility by Eight 数学 枚举
题目链接:http://codeforces.com/problemset/problem/550/C//数学 枚举//一个数字能不能被8整除取决于其后三位,后三位能被8整除那么这个数就能被8整除.//于是我们只需要在字符串中取出三个数字,只要这三个数组成的数能被8整除,那么就是可行的答案.#include<stdio.h>#include<string>#include<cstring>原创 2016-08-15 20:50:07 · 376 阅读 · 0 评论 -
暑假集训-训练 背包
B - FATE Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeHDU 2159 Description 最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪原创 2016-07-31 22:10:34 · 428 阅读 · 0 评论 -
暑假训练-训练7 概率DP
A - Aeroplane chess Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Hzz loves aeroplane chess very much. The chess map contains N+1 grids label原创 2016-07-31 22:14:35 · 567 阅读 · 0 评论 -
CodeForces 471B MUH and Important Things 模拟 水
B. MUH and Important Things time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output It’s time polar bears Menshykov and Uslada from the zoo of St.原创 2016-08-16 13:32:51 · 360 阅读 · 0 评论 -
HDU 2795 Billboard 线段树
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 19441 Accepted Submission(s): 8132Problem Description At the entrance to the univ原创 2016-08-16 13:33:31 · 277 阅读 · 0 评论 -
UVA 11988 Broken Keyboard (a.k.a. Beiju Text) 字符串处理
You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problem with the keyboard is that sometimes the “home” key or the “end” key gets automatically pressed (inter原创 2016-08-16 13:34:26 · 381 阅读 · 0 评论 -
CodeForces 471D MUH and Cube Walls KMP
D. MUH and Cube Walls time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Polar bears Menshykov and Uslada from the zoo of St. Petersburg and原创 2016-08-16 13:35:13 · 397 阅读 · 0 评论 -
CodeForces 471C MUH and House of Cards
C. MUH and House of Cards time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Polar bears Menshykov and Uslada from the zoo of St. Petersburg a原创 2016-08-16 13:35:56 · 257 阅读 · 0 评论