Can you answer these queries? HDU - 4027 (线段树区间修改查询)
A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be marked a value of end...
Babelfish POJ - 2503 (map || 二分查找)
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 dictionary to help you understand them.
Input
Input ...
Tunnel Warfare HDU - 1540 (线段树区间最值***)
Tunnel Warfare
HDU - 1540
During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected b...
a==b? java
A == B ?
HDU - 2054
Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".
Input
each test case contains two numbers A and B.
Output
for each case, if A is e...
大数加法 51Nod - 1005
大数加法
51Nod - 1005
给出2个大整数A,B,计算A+B的结果。
Input
第1行:大数A
第2行:大数B
(A,B的长度 <= 10000 需注意:A B有可能为负数)
Output
输出A + B
Sample Input
68932147586
468711654886
Sample Output
537643802472
import...
大菲波数 HDU - 1715
Fibonacci数列,定义如下:
f(1)=f(2)=1
f(n)=f(n-1)+f(n-2) n>=3。
计算第n项Fibonacci数值。
Input
输入第一行为一个整数N,接下来N行为整数Pi(1<=Pi<=1000)。
Output
输出为N行,每行为对应的f(Pi)。
Sample Input
5
1
2
3
4
5
Sample Out...
A/B HDU - 1576
A/B
HDU - 1576
要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。
Input
数据的第一行是一个T,表示有T组数据。
每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。
Output
对应每组数据输出(A/B)%9973...
What day is that day? ZOJ - 3785
What day is that day?
ZOJ - 3785
It's Saturday today, what day is it after 11 + 22 + 33 + ... + NNdays?
Input
There are multiple test cases. The first line of input contains an integer T indicat...
抽象类-编程实现运算类(java)
抽象类-编程实现运算类题目描述编程实现运算类(1)定义抽象类Operation,有double型数据成员numberA、numberB,有抽象方法getResult()(2)定义Operation的4个子类,分别实现加、减、乘、除四则运算(3)定义类OperationFactory:有静态方法Operation createOperate(String operate); 根据形参operate的...
HTML embed标签使用方法和属性详解
一、基本语法 代码如下: embed src=url 说明:embed可以用来插入各种多媒体,格式可以是 Midi、Wav、AIFF、AU、MP3等等,Netscape及新版的IE 都支持。url为音频或视频文件及其路径,可以是相对路径或绝对路径。 示例: 代码如下: <embed src="your.mid"> 二、属性设置 1、自动播放: 语法:autostart=true、fal...
sql 的左连接与右连接区别
假设有A,B两个表。
表A记录如下:
aID aNum
1 a20050111
2 a20050112
3 a20050113
4 a20050114
5 a20050115
表B记录如下:
bID bName
1 2006032401
2 2006032402
3 ...
数据库求闭包,求最小函数依赖集,求候选码,判断模式分解是否为无损连接,3NF,BCNF
数据库求闭包,求最小函数依赖集,求候选码,判断模式分解是否为无损连接,3NF,BCNF1.说白话一点:闭包就是由一个属性直接或间接推导出的所有属性的集合。 例(1): 设有关系模式R(U,F),其中U={A,B,C,D,E,I},F={A→D,AB→E,BI→E,CD→I,E→C},计算(AE)+ 解: (1) 令X={AE},X(0)=AE (...
Very Simple Problem(FZU 1350)
During a preparation of programming contest, its jury is usually faced with many difficult tasks. One of them is to select a problem simple enough to most, if not all, contestants to solve.
The di...
Seaside HDU 3665 【Dijkstra】
Seaside
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1880 Accep...
杭电1097A hard puzzle(快速幂求余)
A hard puzzle
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 36011 Accepted Submission(s): 12871
Problem Description
lcy gives a hard puz...
HDU 5363 Key Set(快速幂)
Key Set
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 2750 Accepted Submission(s): 1373
Problem Description
soda h...
今日推荐
周排行