随笔分类 -  NYNU_ACM

摘要:The input file contains several cases. Each test case begins with two integers n and m in a line, where n is the number of students, and m is the numb 阅读全文
posted @ 2016-03-13 14:05 Vmetrio 阅读(256) 评论(0) 推荐(0)
摘要:一天萌萌哒孟孟学长去博物馆参观,他想看到更多的东西。博物馆可以表示为N × M细胞的一个矩形区域。 “.”表示为路,“*”表示为墙壁,每个墙壁上面都挂有美丽的画卷。孟孟学长可以看到与他所在位置相邻的墙壁上面的画卷。他有很多时间,所以他会沿着路走,只要路是通的每一张图片都可以看到。 提示:墙壁有4个面 阅读全文
posted @ 2016-03-13 13:58 Vmetrio 阅读(257) 评论(0) 推荐(0)
摘要:In computer science, a binary tree is a tree data structure in which each node has at most two children. Consider an infinite full binary tree (each n 阅读全文
posted @ 2016-03-13 13:57 Vmetrio 阅读(234) 评论(0) 推荐(0)
摘要:有一天,小米找到了一个藏宝的迷宫地图,迷宫在一个沙漠里有,迷宫里面有许多宝藏。迷宫里可能有N个藏宝地点,用1到K标记。藏宝地点之间最多有一条通路相连。标记1为迷宫的进出口。 他已经知道其中K(1<=K<=N)个不同的地点真的藏有宝物。小米决定让他的机器人米多奇去探险。迷宫中的通路不是平坦的,到处都是 阅读全文
posted @ 2016-03-13 13:56 Vmetrio 阅读(162) 评论(0) 推荐(0)
摘要:  阅读全文
posted @ 2016-03-13 13:53 Vmetrio 阅读(186) 评论(0) 推荐(0)
摘要:二叉树,若其与自己的镜像完全相同,就称其为镜像树。 是一棵镜像树;而 不是镜像树。现给你一棵二叉树,请你判断其是不是镜像树。         阅读全文
posted @ 2016-03-13 13:49 Vmetrio 阅读(309) 评论(0) 推荐(0)
摘要:题目描述 You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a 阅读全文
posted @ 2016-02-16 17:52 Vmetrio 阅读(233) 评论(0) 推荐(0)
摘要:来自:http://blog.csdn.net/tigerjibo/article/details/6442151 sscanf 名称: sscanf() - 从一个字符串中读进与指定格式相符的数据. 函数原型: int sscanf( const char *, const char *, ... 阅读全文
posted @ 2016-02-16 17:44 Vmetrio 阅读(225) 评论(0) 推荐(0)
摘要:题目描述 The binary weight of a positive integer is the number of 1's in its binary representation.for example,the decmial number 1 has a binary weight of 阅读全文
posted @ 2016-02-09 11:44 Vmetrio 阅读(269) 评论(0) 推荐(0)
摘要:Problem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile... 阅读全文
posted @ 2015-12-10 14:18 Vmetrio 阅读(144) 评论(0) 推荐(0)
摘要:原文链接:http://blog.polossk.com/201405/c-plus-plus-g-plus-plusG++?首先更正一个概念,C++是一门计算机编程语言,G++不是语言,是一款编译器中编译C++程序的命令而已。那么他们之间的区别是什么?在提交题目中的语言选项里,G++和C++都代表... 阅读全文
posted @ 2015-12-03 21:35 Vmetrio 阅读(305) 评论(0) 推荐(0)
摘要:我想对未来的同学有几句话要说:1 我们几乎没有noi上来的队员,大家只能依靠后期的更加刻苦的努力。2 我们没有专业的班级或者机制形成职业ACM队伍,所以大家只能尽早的投入进来,用尽一切课余时间去训练。3 我们不能在数目上和传统强队比拼(除非队伍中的三个人都很强),所以我们要在中低档题目的ac时间和正... 阅读全文
posted @ 2015-10-13 19:57 Vmetrio 阅读(539) 评论(0) 推荐(0)
摘要:1. 变量。大家都知道,debug跟release在初始化变量时所做的操作是不同的,debug是将每个字节位都赋成0xcc(注1),而release的赋值近似于随机(我想是直接从内存中分配的,没有初始化过)。这样就明确了,如果你的程序中的某个变量没被初始化就被引用,就很有可能出现异常:用作控制变量将... 阅读全文
posted @ 2015-10-09 14:25 Vmetrio 阅读(334) 评论(0) 推荐(0)
摘要:问题描述给定一个十进制整数N,求出从1到N的所有整数中出现”1”的个数。例如:N=2时 1,2出现了1个 “1” 。N=12时 1,2,3,4,5,6,7,8,9,10,11,12。出现了5个“1”。方法一 暴力求解最直接的方法就是从1开始遍历到N,将其中每一个数中含有“1”的个数加起来,就得到了问... 阅读全文
posted @ 2015-10-09 14:24 Vmetrio 阅读(237) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2015-10-09 14:20 Vmetrio 阅读(32) 评论(0) 推荐(1)
该文被密码保护。
posted @ 2015-10-09 14:15 Vmetrio 阅读(1) 评论(0) 推荐(0)
摘要:有些事情经历一次就好,一次的经历足以成长。 其实,对于数模真的没什么要说的,也没什么好写的。从9月11日,8点见到赛题,到今天早上8点的提交,短短的三天,度过寂静的黑夜,见到微曦的黎明。三天三夜,9个小时,以证明平均每天休息三个小时,是可以生存的。 我这么萌,学姐你们还坑我。其实,大大小小的讨论有很 阅读全文
posted @ 2015-10-09 14:13 Vmetrio 阅读(363) 评论(0) 推荐(1)
该文被密码保护。
posted @ 2015-10-09 14:08 Vmetrio 阅读(1) 评论(0) 推荐(0)
摘要:http://acm.njupt.edu.cn/acmhome/problemdetail.do?id=1083&method=showdetail比赛描述字符串的输入输出处理。输入第一行是一个正整数N,最大为100。之后输入多行字符串(行数大于N), 每一行字符串可能含有空格,且字符数不超过100... 阅读全文
posted @ 2015-07-21 14:30 Vmetrio 阅读(1380) 评论(0) 推荐(0)
摘要:1 #include 2 using namespace std ; 3 int gcd(int a,int b) 4 { 5 if(a%b!=0) 6 return gcd(b,a%b); 7 else 8 return b ; 9 }10... 阅读全文
posted @ 2015-06-02 21:18 Vmetrio 阅读(289) 评论(0) 推荐(0)