ZOJ 3702 Gibonacci number】的更多相关文章

Gibonacci number Time Limit: 2 Seconds      Memory Limit: 65536 KB In mathematical terms, the normal sequence F(n) of Fibonacci numbers is defined by the recurrence relation F(n)=F(n-1)+F(n-2) with seed values F(0)=1, F(1)=1 In this Gibonacci numbers…
本来已经关上电脑了 但还是想打开电脑纪念一下这充实的一天…… 第一节高数课讲新课级数 讲完一个知识点 想问问女票今天咋又没来上课…… 突然发现院长问我自费去不去省赛…… !!! 当然是去啊! ……虽然是自费 ……马上联系了两个和我一样的小伙伴组了个队 ……想队名的时候 想了一个异常棒的队名 ……我们经历过绝望 ……中午取完快递 买了碗泡面回寝室把报名表填了 ……下午去买的词典 ……上完课立刻去机房参加最后一场训练赛 ……无论如何 即使是自费去 也要好好打 全力以赴! 接下来讲题…… 一开始的思路…
公式推导题,G(0) = 1,G(1) = t,给出一个 i 和 G(i),要求求出G(j)的值: G(0) = 0*t + 1 G(1) = 1*t + 0; 观察t的系数和常数值可以知道二者都遵循斐波那契的规律,设系数值为Y(n),常数值为X(n); G(2) = 1*t + 1; Y(0) = 0,Y(1) = 1; G(3) = 2*t + 1; X(0) = 1, X(1) = 0; G(4) = 3*t + 2; 这样就能求出答案了,最后的t满足要求就有解 G(5) = 5*t +…
A - Magic Number Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3622 Appoint description:   Description A positive number y is called magic number if for every positive integer x it satisfies tha…
题意   把一个数替换为这个数相邻数字差组成的数  知道这个数仅仅剩一位数  若最后的一位数是7  则称原来的数为 July Number  给你一个区间  求这个区间中July Number的个数 从7開始DFS  位数多的数总能由位数小的数推出 #include <bits/stdc++.h> using namespace std; const int N = 1e6; int july[N], n; set<int> ans; int pw[] = {1, 10, 100,…
Lucky Number Time Limit: 5000ms Memory Limit: 32768KB This problem will be judged on ZJU. Original ID: 323364-bit integer IO format: %lld      Java class name: Main   Watashi loves M mm very much. One day, M mm gives Watashi a chance to choose a numb…
Magic Number Time Limit: 2 Seconds      Memory Limit: 32768 KB A positive number y is called magic number if for every positive integer x it satisfies that put y to the right of x, which will form a new integer z, z mod y = 0. Input The input has mul…
题意  假设一个正整数y满足  将随意正整数x放到y的左边得到的数z满足 z%y==0  那么这个数就是个Magic Number   给你一个范围  求这个范围内Magic Number的个数 令 l表示y的位数  ly=10^l  那么z=x*ly + y  要z%y==0   easy看出  仅仅需 x*ly%y==0 又由于x是随意的  所以一个Magic Number必须满足 ly%y==0 y<2^31  所以l最大为10 直接枚举l  找到全部符合的y即可了 当 ly%y==0  …
Big Number Time Limit: 10 Seconds      Memory Limit: 32768 KB In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a n…
problemCode=3886">ZOJ 3886 题意: 定义一种NicoNico数x,x有下面特征: 全部不大于x且与x互质的数成等差数列,如x = 5 ,与5互素且不大于5的数1,2,3,4成等差数列.则5是一个NicoNico数. 再定义三种操作: 1.南小鸟询问[L, R]内有多少个NicoNico数: 2.果皇把[L, R]内的数全部对v取余: 3.果皇将第K个数换成X. 然后给你一个数列,并对这个数列运行若干操作 思路: 这样的问题果断要用LoveLive树线段树来做! 首…