上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 46 下一页
摘要: 题目描述 在一个直角坐标系中有一条线段,求这条线段上有几个整数点; 在一个直角坐标系中有一条线段,求这条线段上有几个整数点; 输入 输入一个数T(T<10000),表示有T组测试数据; 每组数据输入有四个整数x1, y1, x2, y2,表示线段的两端点坐标; (-1e16<=x1,x2,y1,y2 阅读全文
posted @ 2018-04-17 19:55 楼主好菜啊 阅读(965) 评论(0) 推荐(0)
摘要: 【题目描述】 给出正整数n,m,区间[n,m]内的无平方因子数有多少个? 整数p无平方因子,当且仅当不存在k>1,使p是k^2的倍数,1<=n<=m<=10^12,m-n<=10^7 【输入格式】 两个整数n,m 【输出格式】 [n,m]间的无平方因子数的个数 【样例输入】 【样例输出】 【提示】 阅读全文
posted @ 2018-04-17 19:06 楼主好菜啊 阅读(382) 评论(0) 推荐(0)
摘要: 【题目描述】 经过无尽的蘑菇和无尽的不知道错在哪里、不知道发生了什么只下,恭喜KZ成功的造出了数据!!可喜可贺可喜可贺 给出一个这样的除法表达式:X1/X2/X3/X4/X5/X6..../Xk, 正常的除法表达式是从左往右计算的,但是我们可以向其中添加括号,以改变它的运算顺序,如1/2/1/2=1 阅读全文
posted @ 2018-04-17 18:09 楼主好菜啊 阅读(838) 评论(0) 推荐(0)
摘要: 链接:https://www.nowcoder.com/acm/contest/91/F来源:牛客网 小Y在研究数字的时候,发现了一个神奇的等式方程,他屈指算了一下有很多正整数x满足这个等式,比如1和2,现在问题来了,他想知道从小到大第N个满足这个等式的正整数,请你用程序帮他计算一下。 (表示按位异 阅读全文
posted @ 2018-04-15 20:56 楼主好菜啊 阅读(338) 评论(0) 推荐(0)
摘要: You are given a tree, it’s root is p, and the node is numbered from 1 to n. Now define f(i) as the number of nodes whose number is less than i in all 阅读全文
posted @ 2018-04-15 15:48 楼主好菜啊 阅读(212) 评论(0) 推荐(0)
摘要: 推荐博客 :https://www.cnblogs.com/stxy-ferryman/p/7741970.html DFS序其实就是一棵树顺次访问的结点的顺序,例如下面这棵树 它的 dfs 序就是 A-B-D-E-G-C-F-H 我们这里的 dfs_[ ] 数组表示的就是这棵树的 dfs 序,s[ 阅读全文
posted @ 2018-04-15 11:27 楼主好菜啊 阅读(335) 评论(0) 推荐(0)
摘要: Description 给定一棵N个节点的树,每个点有一个权值,对于M个询问(u,v,k),你需要回答u xor lastans和v这两个节点间第K小的点权。其中lastans是上一个询问的答案,初始为0,即第一个询问的u是明文。 给定一棵N个节点的树,每个点有一个权值,对于M个询问(u,v,k), 阅读全文
posted @ 2018-04-14 19:01 楼主好菜啊 阅读(670) 评论(0) 推荐(0)
摘要: You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a ne 阅读全文
posted @ 2018-04-14 12:37 楼主好菜啊 阅读(264) 评论(0) 推荐(0)
摘要: One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results onl 阅读全文
posted @ 2018-04-13 22:41 楼主好菜啊 阅读(1182) 评论(0) 推荐(1)
摘要: 推荐博客 : https://blog.csdn.net/creatorx/article/details/75446472 : https://www.cnblogs.com/zyf0163/p/4749042.html 早在很久之前就听过主席树这个名词,不过一直没有去学,当时想的是先把线段树学明 阅读全文
posted @ 2018-04-13 22:35 楼主好菜啊 阅读(188) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 46 下一页