POJ.grids.2980】的更多相关文章

题目链接:http://bailian.openjudge.cn/practice/2980 解题思路:先将对应位相乘的积累加,最后再来处理进位问题:如 835*49: 先做 835*9: 得到 i  2            1           0 72           27          45 再做 835*4 得到 i   3                   2                  1               0 32                  1…
2951:浮点数求高精度幂 总时间限制: 1000ms 内存限制: 65536kB 描述 有一个实数 R ( 0.0 < R < 99.999 ) ,要求写程序精确计算 R 的 n 次方.n 是整数并且 0 < n <= 25. 输入 T输入包括多组 R 和 n. R 的值占第 1 到 第 6 列,  n 的值占第 8 和第 9 列. 输出 对于每组输入,要求输出一行,该行包含精确的 R 的 n 次方.输出需要去掉前导的 0 后后面不不要的 0 .如果输出是整数,不要输出小数点.…
pojg:http://poj.grids.cn/practice/2808 解法1:以空间换时间: #include<stdio.h> #include<string.h> int main() { int L,M; scanf("%d%d",&L,&M); ]; memset(a,,); int m,n; ;i<=M;i++) { scanf("%d%d",&m,&n); for(int j=m;j&…
http://poj.grids.cn/practice/2744 描述现在有一些由英文字符组成的大小写敏感的字符串,你的任务是找到一个最长的字符串x,使得对于已经给出的字符串中的任意一个y,x或者是y的子串,或者x中的字符反序之后得到的新字符串是y的子串.输入输入的第一行是一个整数t (1 <= t <= 10),t表示测试数据的数目.对于每一组测试数据,第一行是一个整数n (1 <= n <= 100),表示已经给出n个字符串.接下来n行,每行给出一个长度在1和100之间的字符…
http://poj.grids.cn/practice/2974 注意输入中连字符可以任意添加和删除. 描述企业喜欢用容易被记住的电话号码.让电话号码容易被记住的一个办法是将它写成一个容易记住的单词或者短语.例如,你需要给滑铁卢大学打电话时,可以拨打TUT-GLOP.有时,只将电话号码中部分数字拼写成单词.当你晚上回到酒店,可以通过拨打310-GINO来向Gino's订一份pizza.让电话号码容易被记住的另一个办法是以一种好记的方式对号码的数字进行分组.通过拨打必胜客的“三个十”号码3-10…
http://poj.grids.cn/practice/2742 描述判断一个由a-z这26个字符组成的字符串中哪个字符出现的次数最多输入第1行是测试数据的组数n,每组测试数据占1行,是一个由a-z这26个字符组成的字符串每组测试数据之间有一个空行,每行数据不超过1000个字符且非空输出n行,每行输出对应一个输入. 一行输出包括出现次数最多的字符和该字符出现的次数,中间是一个空格.如果有多个字符出现的次数相同且最多,那么输出ascii码最小的那一个字符样例输入 2 abbccc adfadff…
ACM主要算法ACM主要算法介绍 初期篇 一.基本算法(1)枚举(poj1753, poj2965)(2)贪心(poj1328, poj2109, poj2586)(3)递归和分治法(4)递推(5)构造法(poj3295)(6)模拟法(poj1068, poj2632, poj1573, poj2993, poj2996)二.图算法(1)图的深度优先遍历和广度优先遍历(2)最短路径算法(dijkstra, bellman-ford, floyd, heap+dijkstra)(poj1860,…
题目链接:http://poj.org/problem?id=2389 题目意思:就是大整数乘法. 题目中说每个整数不超过 40 位,是错的!!!要开大点,这里我开到100. 其实大整数乘法还是第一次写 = =.......大整数加法写得比较多.百练也有一条是大整数乘法,链接如下:http://bailian.openjudge.cn/practice/2980/ 一步一步模拟即可,代码就是按这个来写的. 以 835 * 49 为例(亲爱的读者,允许我截图吧) 简直就是神奇呀----- #inc…
Chessboard Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 14787   Accepted: 4607 Description Alice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2…
Chessboard Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 12800   Accepted: 4000 Description Alice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2…
Robot Motion Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12856   Accepted: 6240 Description A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in…
Stars in Your Window Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10806   Accepted: 2980 Description Fleeting time does not blur my memory of you. Can it really be 4 years since I first saw you? I still remember, vividly, on the beaut…
Cutting Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2844   Accepted: 1036 Description Urej loves to play various types of dull games. He usually asks other people to play with him. He says that playing those games can show his e…
Georgia and Bob Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 7233   Accepted: 2173 Description Georgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, ...…
1.Link: http://poj.org/problem?id=1573 http://bailian.openjudge.cn/practice/1573/ 2.Content: Robot Motion Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 10856   Accepted: 5260 Description A robot has been programmed to follow the instru…
Georgia and Bob Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 8656   Accepted: 2751 Description Georgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, ...…
POJ 3074 : Description In the game of Sudoku, you are given a large 9 × 9 grid divided into smaller 3 × 3 subgrids. For example, . 2 7 3 8 . . 1 . . 1 . . . 6 7 3 5 . . . . . . . 2 9 3 . 5 6 9 2 . 8 . . . . . . . . . . . 6 . 1 7 4 5 . 3 6 4 . . . . .…
题目地址: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=258 http://poj.org/problem?id=1138 题目描写叙述:  Ships  Probably everyone who ever attended school knows the game where two opposing players place…
Description Georgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, ..., and place N chessmen on different grids, as shown in the following figure for example: Georgia an…
Georgia and Bob Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 9363   Accepted: 3055 Description Georgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, ...…
Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 11357   Accepted: 3749 Description Georgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, ..., and place N c…
Cutting Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4798   Accepted: 1756 Description Urej loves to play various types of dull games. He usually asks other people to play with him. He says that playing those games can show his e…
http://poj.org/problem?id=1562                                                                                                    Oil Deposits Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12595   Accepted: 6868 Description The GeoSurv…
Georgia and Bob Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 6622   Accepted: 1932 Description Georgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, ...…
Description A Sudoku grid is a 16x16 grid of cells grouped in sixteen 4x4 squares, where some cells are filled with letters from A to P (the first 16 capital letters of the English alphabet), as shown in figure 1a. The game is to fill all the empty g…
http://poj.org/problem?id=2446 Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 18560   Accepted: 5857 Description Alice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of c…
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9776 Accepted: 3222 Description Georgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, -, and place N chessmen…
题目代号:POJ 1573 题目链接:http://poj.org/problem?id=1573 Language: Default Robot Motion Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 14195   Accepted: 6827 Description A robot has been programmed to follow the instructions in its path. Instr…
Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798   Special Judge Description Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets…
Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   Special Judge Description The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000…