Jzzhu has invented a kind of sequences, they meet the following property:
You are given x and y,
please calculate fn modulo 1000000007 (109?+?7).
Input
The first line contains two int...
分类:
其他好文 时间:
2014-07-22 22:49:33
阅读次数:
296
解题报告
算是规律题吧,,,x y z -x -y -z
注意的是如果数是小于0,要先对负数求模再加模再求模
给我的戳代码跪了,,,
#include
#include
#include
using namespace std;
long long x,y,z;
long long n;
int main()
{
cin>>x>>y;
cin>>n;
z=y...
分类:
其他好文 时间:
2014-07-22 22:49:15
阅读次数:
225
Jzzhu has invented a kind of sequences, they meet the following property:
You are given x and
y, please calculate fn modulo
1000000007 (109?+?7).
Input
The first line contains two integers...
分类:
其他好文 时间:
2014-07-20 10:43:17
阅读次数:
213
# include
int f[10];
int main()
{
int x,y,n,j;
while(~scanf("%d%d%d",&x,&y,&n))
{
f[1]=x;
f[2]=y;
for(j=3;j<=6;j++)
{
f[j]=f[j-1]-f[j-2];
}
n%=6;
if(n==0)
n=6;
if(f[...
分类:
其他好文 时间:
2014-07-20 10:14:09
阅读次数:
137
Binary String Matching
时间限制:3000 ms | 内存限制:65535 KB
难度:3
描述
Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as...
分类:
其他好文 时间:
2014-07-19 13:26:19
阅读次数:
274
Your little brother has just learnt to write one, two and three, in English. He has written a lot of those words in a paper, your task is to recognize...
分类:
其他好文 时间:
2014-07-19 11:30:29
阅读次数:
225
Your little brother has just learnt to write one, two and three, in English. He has written a lot of those words in a paper, your task is to recognize...
分类:
其他好文 时间:
2014-07-19 09:31:41
阅读次数:
238
一个好的框架,不仅能帮助程序开发节约很多时间,同时也能减少bug的引入。这个框架是在ssy同学的基础上进行了一些改进: 主要在于一下几点(会随着项目开发逐渐更新这篇文章) 1. 应用了反射机制,实现网络Task的多态。 2. 应用MVC模式,独立出数据Model,让Activity更加专注在界面响应...
分类:
其他好文 时间:
2014-07-19 08:37:19
阅读次数:
396
12 #include 3 4 #include "bsp-fifisdr.h"5 6 #include "lpclib.h"7 #include "task-gui.h"8 9 10 #define GUI_QUEUE_LENGTH ...
分类:
其他好文 时间:
2014-07-19 08:33:01
阅读次数:
283
codeforces 446A DZY Loves Sequences DP...
分类:
其他好文 时间:
2014-07-19 02:32:55
阅读次数:
155