Very Simple Counting Time Limit: 1 Second      Memory Limit: 32768 KB Let f(n) be the number of factors of integer n. Your task is to count the number of i(1 <= i < n) that makes f(i) = f(n). Input One n per line (1 < n <= 1000000). There are…
17997 Simple Counting 时间限制:2000MS  内存限制:65535K提交次数:0 通过次数:0 题型: 编程题   语言: 不限定 Description Ly is crazy about counting . Recently , he got a simple problem , but he had to learn Gaoshu these days .So , he turns to you for help . You are given a sequenc…
摘 要:我们为什么要使用Access,而不用Excel,因为数据库可以大幅度地消除冗余数据,其方法就是将数据拆分到不同的表中,再通过“关系”建立表间的联系.那么如何确定表间的关系呢.表之间的关系是通过主键和外键实现的.主键所在的表示主表,使用外键作为主键的表是子表.为了看表数据显得直观易懂,有时就要插入子数据表功能来完成.下面以销售订单表,销售订单明细表举例. 正 文: 点击下载此附件 效果如下图 方法:先建立两表关系,然后再插入子数据表,选择链接主子字段就完成了.如下图 关系创建完成之后,就可…
Description Let f(n) be the number of factors of integer n. Your task is to count the number of i(1 <= i < n) that makes f(i) = f(n). Input One n per line (1 < n <= 1000000). There are 10000 lines at most. Output For each n, output counting re…
A Simple Tree Problem Time Limit: 3 Seconds      Memory Limit: 65536 KB Given a rooted tree, each node has a boolean (0 or 1) labeled on it. Initially, all the labels are 0. We define this kind of operation: given a subtree, negate all its labels. An…
题目链接: https://cn.vjudge.net/problem/ZOJ-3286 题目大意: f(n)为n的因子个数 求出有多少个f(i)使得f(i) == f(n) && i < n 解题思路: 打表出因子个数,然后直接记录因子个数这个值出现次数,记录答案即可 #include<bits/stdc++.h> using namespace std; typedef long long ll; ll n, m; ; int num[maxn];//记录因子数目 i…
A Simple Question of Chemistry Time Limit: 2 Seconds      Memory Limit: 65536 KB Your chemistry lab instructor is a very enthusiastic graduate student who clearly has forgotten what their undergraduate Chemistry 101 lab experience was like. Your inst…
Solution: 根据树的遍历道的时间给树的节点编号,记录下进入节点和退出节点的时间.这个时间区间覆盖了这个节点的所有子树,可以当做连续的区间利用线段树进行操作. /* 线段树 */ #pragma comment(linker, "/STACK:102400000,102400000") #include <iostream> #include <cstdio> #include <cstring> #include <cmath>…
Description Given a rooted tree, each node has a boolean (0 or 1) labeled on it. Initially, all the labels are 0. We define this kind of operation: given a subtree, negate all its labels. And we want to query the numbers of 1's of a subtree. Input Mu…
A Simple Nim 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5795 Description Two players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn they can pick any number of candies which come from the…