01 2019 档案
摘要:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std; char s[10][10]; int panduan(int row,int cew) { for
阅读全文
摘要:Absent-minded Masha got set of n cubes for her birthday. At each of 6 faces of each cube, there is exactly one digit from 0 to 9. Masha became interes
阅读全文
摘要:Little Tom loves playing games. One day he downloads a little computer game called 'Bloxorz' which makes him excited. It's a game about rolling a box
阅读全文
摘要:Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world.
阅读全文
摘要:定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/problem/16601?&headNav=acm来源:牛客网 经过11年的韬光养晦,某国研发出了一种新的导弹拦截系统,凡是与它的距离不超过其工作半径的导弹都能够被它成功拦截。当工作半径为0时,则能够拦截与它位置恰好相同的导弹。但该导弹
阅读全文
摘要:T. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is an integer in
阅读全文
摘要:The modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (mod m). This is equivalent to ax≡1 (mod m). Input
阅读全文
摘要:题目:The Tower of Babylon 这是一个DAG 模型,有两种常规解法 1.记忆化搜索, 写函数,去查找上一个符合的值,不断递归 2.递推法
阅读全文
摘要:题目:UVA 103 stacking boxes 题目大意: 给你两个数,一个是盒子的个数,一个是每一个盒子的维数。将一个个盒子互相装起来,让你求最多可以装多少个,要求字典序最小。 解析:这个就是盒子的嵌套,和二维盒子嵌套有点像,只是建图的方法不一样,二维只要判断两个,长和宽即可,而k维需要判断k
阅读全文
摘要:Peter has a sequence a1,a2,...,ana1,a2,...,an and he define a function on the sequence -- F(a1,a2,...,an)=(f1,f2,...,fn)F(a1,a2,...,an)=(f1,f2,...,fn)
阅读全文