FOJ
文章平均质量分 75
tao_tao_bu_jue
-
展开
-
FOJ_1002_HangOver
How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to原创 2008-07-18 20:08:00 · 731 阅读 · 0 评论 -
FOJ 1635 Commandos
CommandosTime Limit:1sMemory limit:32MAccepted Submit:27Total Submit:32A group of commandos were assigned a critical task. They are to destroy an enemy h原创 2008-08-08 09:14:00 · 562 阅读 · 0 评论 -
FOJ 1208 最大k乘积问题
设I是一个n位十进制整数。如果将I划分为k段,则可得到k个整数。这k个整数的乘积称为I的一个k乘积。试设计一个算法,对于给定的I和k,求出I的最大k乘积。对于给定的I和k,编程计算I的最大k乘积。数据输入输入文件由多组数据组成。每组数据格式如下:第1行中有2个正整数n和k。正整数n是序列的长度;正整数k是分割的断数。接下来的一行中是一个n位十进制整数。(n结果输出对于每组数据,输出计算出的原创 2008-08-08 10:24:00 · 1074 阅读 · 0 评论 -
FOJ 1230 区间相交问题
区间相交问题Time Limit:1sMemory limit:32MAccepted Submit:33Total Submit:78<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3原创 2008-08-08 10:30:00 · 2302 阅读 · 0 评论 -
FOJ 1404 Andy的作业
Andy的作业Time Limit:1sMemory limit:32MAccepted Submit:151Total Submit:1020Andy每天都有很多作业要做,他的老师总是在说“这些作业你明天必须交上来……”。现在他找你帮忙做其中的一项作业,给出N个整数A1, A2, ..., AN,有 M 个询问原创 2008-08-08 11:35:00 · 651 阅读 · 2 评论 -
POJ 2545 Hamming Problem
For each three prime numbers p1, p2 and p3, lets define Hamming sequence Hi(p1, p2, p3), i=1, ... as containing in increasing order all the natural numbers whose only prime divisors are原创 2008-08-08 11:52:00 · 1221 阅读 · 0 评论 -
FOJ 1599 Cow Travelling
一开始土土dfs,不是WA就是TLE .....最后发现原来可以回头走的-_______________-那确实没做过够麻烦想了好久......最后竟然发现开始点居然被我标记了....取消标记后一次AC的说...dp[100][100][16]中dp[x][y][t]用来保存(x,y)点在剩余时间还为t时到达终点的方案数.然后就是土土的dfs....-__________-学习到不少的原创 2008-08-21 19:07:00 · 2225 阅读 · 0 评论 -
FZU_1615 Hero's RP
类似一个高中的DP题。树状DPhttp://acm.fzu.edu.cn/problem.php?pid=1615题目的意思就是邀请一些人,可以获得对应的RP价值,可是如果邀请到了有上下属关系的人,那么RP价值会减少,求的就是如何邀请才能使获得的RP最大开个数组dp[i][2]表示第i个节点选择与否的解,然后从根DFS,最后线性扫描数组取max(dp[i][0],dp[i][1])(0一开始就只以原创 2008-10-25 07:11:00 · 439 阅读 · 0 评论 -
FOJ 1582 众数问题
众数问题 Time Limit:1sMemory limit:32MAccepted Submit:226Total Submit:926 给定含有n个元素的多重集合S,每个元素在S中出现的次数称为该元素的重数。多重集S中重数最大的元素称为众数。例如,S={1,2,2,2,3,5}。多重集S的众数是2,其重数为3。数据输入输入包括多组数据,原创 2008-10-26 09:44:00 · 1705 阅读 · 0 评论 -
FZU 1608 Huge Mission
http://acm.fzu.edu.cn/problem.php?pid=1608题目的意思很简单,就是问在所给的时间段内的最大的工作量,考察的是线段树,下面是偶写的不怎么样的Pascal代码跑了3S+...无语,C++ 1S内..寒~插入的时候完全覆盖才插入,最后来次dfs更新,统计元区间的值就OKtype Segment=record L,R,tLen:longint;end;vara原创 2008-11-10 21:52:00 · 654 阅读 · 0 评论 -
FOJ 1643 Oaiei's cube II
Oaieis cube IITime Limit:1sMemory limit:32MAccepted Submit:16Total Submit:31One day, oaiei plays with his cubes again. He writes “0” or “1” in his N cubes. The原创 2008-08-08 08:22:00 · 466 阅读 · 0 评论 -
FOJ 1410 变位词
变位词Time Limit:1sMemory limit:32MAccepted Submit:204Total Submit:725Mr. Right有一个奇怪的嗜好,就是看见一个单词就有找它所有的变位词的冲动。一个单词的变位词就是该单词所有字母的一个排列。 输入输出格式输入数据第一行为一个整数n,1对应M原创 2008-08-08 11:39:00 · 1136 阅读 · 2 评论 -
FOJ 1000 PKU 1000 FJNU 1000 A+B Problem
Calculate a + b InputThe input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line. OutputFor each pair of input integers a and b you should outpu原创 2008-07-18 19:51:00 · 660 阅读 · 0 评论 -
FOJ_1001_Duplicate Pair
An array of length n, with address from 1 to n inclusive, contains entries from the set {1,2,...,n-1} and there's exactly two elements with the same value. Your task is to find out the value原创 2008-07-18 20:03:00 · 1384 阅读 · 0 评论 -
FZU 1632 Word Power
Word PowerTime Limit:2sMemory limit:32MAccepted Submit:131Total Submit:371Farmer John wants to evaluate the quality of the names of his N (1 <= N <= 1000原创 2008-08-07 23:33:00 · 532 阅读 · 0 评论 -
FOJ 1544 PKU 3615 Cow Hurdles
Cow HurdlesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 564 Accepted: 254DescriptionFarmer John wants the cows to prepare for the county jumping原创 2008-08-08 08:58:00 · 940 阅读 · 0 评论 -
Beavergnaw
BeavergnawTime Limit:1sMemory limit:32MAccepted Submit:284Total Submit:505When chomping a tree the beaver cuts a very specific shape out of the tree trunk.原创 2008-08-08 09:19:00 · 654 阅读 · 0 评论 -
POJ 2688 FOJ 1634 Cleaning Robot
Cleaning RobotTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 936Accepted: 391DescriptionHere, we want to solve path planning for a mobile robot cleaning a rectangul原创 2008-08-08 09:51:00 · 2065 阅读 · 0 评论 -
FOJ 1543 Avoid The Lakes
Avoid The LakesTime Limit:1sMemory limit:32MAccepted Submit:46Total Submit:60Farmer Johns farm was flooded in the most recent storm, a fact only aggravated by原创 2008-08-08 11:20:00 · 489 阅读 · 0 评论 -
FOJ 1205 小鼠迷宫问题
问题描述小鼠a与小鼠b身处一个m×n的迷宫中,如图所示。每一个方格表示迷宫中的一个房间。这m×n个房间中有一些房间是封闭的,不允许任何人进入。在迷宫中任何位置均可沿上,下,左,右4个方向进入未封闭的房间。小鼠a位于迷宫的(p,q)方格中,它必须找出一条通向小鼠b所在的(r,s)方格的路。请帮助小鼠a找出所有通向小鼠b的最短道路。小鼠的迷宫编程任务对于给定的小鼠的迷宫,编程计算小鼠a通向小鼠原创 2008-08-08 10:16:00 · 1274 阅读 · 2 评论 -
FOJ 1174 Dice Stacking
Dice StackingTime Limit:1sMemory limit:32MAccepted Submit:27Total Submit:36Chun-Soo is playing a dice stacking game. Six faces of a die are squares of the same si原创 2008-08-08 10:38:00 · 704 阅读 · 0 评论 -
FOJ 1675 The Seventy-seven Problem
The Seventy-seven Problem Time Limit:2sMemory limit:32MAccepted Submit:20Total Submit:36 One day, daxia writes a big number N that can be divided by seventy-seven on the paper原创 2008-12-23 17:31:00 · 750 阅读 · 3 评论