POJ 3752】的更多相关文章

http://poj.org/problem?id=3752 这是一道我觉得还蛮有意思的题目,不难,是个水题,但我也TLE了几次,感到很奇怪,这么简单的循环还TLE,最后一想,肯定是有几个例子我是没有考虑到的 我觉得就是考你对循环的使用吧 代码写的有点长,有点琐碎 #include <stdio.h> #include <iostream> #include <string.h> using namespace std; ][]; ][]; int main() { i…
问题描述: 给定两个整数M,N,生成一个M*N的矩阵,矩阵中元素取值为A至Z的26个字母中的一个,A在左上角,其余各数按顺时针方向旋转前进,依次递增放置,当超过26时又从A开始填充.例如,当M=5,N=8时,矩阵中的内容如下: A B C D E F G H V W X Y Z A B I U J K L M N C J T I H G F E D K S R Q P O N M L 输入: M为行数,N为列数,其中M,N都为大于0的整数 输出: 分行输出相应的结果 样例输入: 4  9 样例输…
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…
The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286   Accepted: 8603   Special Judge Description The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a…
Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Description Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the…
Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Description Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yumm…
Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050   Accepted: 10989 Description Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representatio…
Tree Recovery Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11939   Accepted: 7493 Description Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital le…
Seek the Name, Seek the Fame Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 17898   Accepted: 9197 Description The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names t…