”toj“ 的搜索结果

     描述 Given a string of symbols, it’s natural to look it over and see what substrings are present. In this problem, you are given a string and asked to consider what substrings are absent....

     链接:http://acm.tju.edu.cn/toj/showp4120.html4120.Zombies VS PlantsTime Limit:1.0 Seconds Memory Limit:65536K Total Runs:268 Accepted Runs:36 tmeteorj recently is interested...

     TOJ4505: KOSARE Time Limit(Common/Java):10000MS/30000MS Memory Limit:65536KByteTotal Submit: 11 Accepted:3 Description Mirko found N boxes with various forgotten toys at his ...

     免费馅饼 描述 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就...

     题目链接:http://acm.tju.edu.cn/toj/showp2894.html 题目大意:给定一些区间 分别表示会议开始时间和结束时间 问至少要用多少间会议室 思路:贪心 将开始时间和结束时间都按从小到大排序 如果后一个会议的开始...

     快速幂。答案一定要补0啊 超级坑爹。因为没有%02d我WA了N次。现贴上代码。 #include #include int m,cnt,sum; int s[35]; void swap(int num) { for(cnt=0;num!=0;cnt++) { s[cnt]=num%2;...int j

     After a long time of algorithm training, we want to hold a running contest in our beautiful campus. Because all of us are curious about a coders's fierce athletic contest,so we would like ...

     描述 Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is ...

     Description Given a series of n numbers a1, a2, ..., an, the partial sum of the numbers is defined as the sum of ai, ai+1, ..., aj.You are supposed to calculate how many partial sums of a given ser...

     题意是给一棵树,求树中任意两点间的距离的最大值。其本质就是:求树的直径。 最短路径部分,可以用迪杰斯特拉实现。可以加优先队列优化一下,但是这里数据不大可以随便搞,快速读入并没有时间优化效果。...

     很简单的优先队列或者堆的使用。 1 #include <iostream> 2 #include <queue> 3 using namespace std;... 5 //greater对int来说表示值越小优先级越高,也可以自己定义比较函数 ..., greate...

     题意:给N只金宝的长度,Q次查询,给出区间[A, B]上最大值和最小值之差。 线段树入门. 线段树比较灵活,写法都是随心而为,不必拘泥于实现,抓住其更本质的数据结构思想即可。 //segment tree ...

     //基础太差,做题就像脑筋急转弯一样,想到了才能AC #include #include #define M 10005 using namespace std; int map[M], num[M]; int main() ... int n, m, k, t1, t2, cnt;... while (scanf("%d%d%d", &n, &m, &k)...

     描述 给定一颗二叉树,要求输出二叉树的深度以及先序遍历二叉树得到的序列。本题假设二叉树的结点数不超过1000。 ...输入数据分为多组,第一行是测试数据的组数n,下面的n行分别代表一棵二叉树。...

     1335: 营救天使 时间限制(普通/Java):1000MS/10000MS 内存限制:65536KByte 描述 Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <...

     1005: Hero In Maze 时间限制(普通/Java):1000MS/10000MS 内存限制:65536KByte 描述 500年前,Jesse是我国最卓越的剑客。他英俊潇洒,而且机智过人_。 突然有一天,Jesse心爱的公主被魔王困在了一个巨大的迷宫中。...

     最后在TOJ运行时间0'00.00", POJ是16ms 我的代码用到的思路有: 1. 所有小棍的和要能够整除4 2. 最长的小棍长度不能超过所有小棍和的1/4 3. 按小棍的长度从大到小排序,可以很快的排除一些不可能的...

10  
9  
8  
7  
6  
5  
4  
3  
2  
1