Last Digits Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2233 Accepted: 474 Description Exponentiation of one integer by another often produces very large results. In this problem, we will compute a function based on repeated expone…
http://poj.org/problem?id=3373 Changing Digits Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 2719 Accepted: 863 Description Given two positive integers n and k, you are asked to generate a new integer, say m, by changing some (maybe…
SudoKu Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu POJ 2676 Description Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the c…
BFS算法与树的层次遍历很像,具有明显的层次性,一般都是使用队列来实现的!!! 常用步骤: 1.设置访问标记int visited[N],要覆盖所有的可能访问数据个数,这里设置成int而不是bool,基于一个考虑,多次循环时不用每次都清空visited,传递进去每次一个数字即可,比如第一次标记为1,判断也采用==1,之后递加即可. 2.设置一个node,用来记录相关参数和当前的步数,比如: struct node { int i; int j; int k; int s;//步数 }; 3.设计…
以前做过的题目了....补集+DP Check the difficulty of problems Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 4091 Accepted: 1811 Description Organizing a programming contest is not an easy job. To avoid making the problems too difficult,…