1091. Tmutarakan Exams Time limit: 1.0 secondMemory limit: 64 MB University of New Tmutarakan trains the first-class specialists in mental arithmetic. To enter the University you should master arithmetic perfectly. One of the entrance exams at the Di…
Tmutarakan Exams Time Limit: 1000ms Memory Limit: 16384KB This problem will be judged on Ural. Original ID: 109164-bit integer IO format: %lld Java class name: (Any) University of New Tmutarakan trains the first-class specialists in mental ari…
1091. Tmutarakan Exams Time limit: 1.0 secondMemory limit: 64 MB University of New Tmutarakan trains the first-class specialists in mental arithmetic. To enter the University you should master arithmetic perfectly. One of the entrance exams at the Di…
Description Davy Jones: You've been captain of the Black Pearl for 13 years. That was our agreement. Jack: Technically I was only captain for two years, then I was mutinied upon. Davy Jones: Then you were a poor captain, but a captain nonetheless. Ha…
题目 vjudge URL:Counting Divisors (square) Let σ0(n)\sigma_0(n)σ0(n) be the number of positive divisors of nnn. For example, σ0(1)=1\sigma_0(1) = 1σ0(1)=1, σ0(2)=2\sigma_0(2) = 2σ0(2)=2 and σ0(6)=4\sigma_0(6) = 4σ0(6)=4. Let S2(n)=∑i=1nσ0(i2).S_2(n…
C. Mike and Foam time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike is a bartender at Rico's bar. At Rico's, they put beer glasses in a special shelf. There are n kinds of beer at Rico's…
题目 Source http://acm.hust.edu.cn/vjudge/problem/42145 Description Let’s assume there is a new chess piece named Super-rook. When placed at a cell of a chessboard, it attacks all the cells that belong to the same row or same column. Additionally it at…
hdu 5792 要找的无非就是一个上升的仅有两个的序列和一个下降的仅有两个的序列,按照容斥的思想,肯定就是所有的上升的乘以所有的下降的,然后再减去重复的情况. 先用树状数组求出lx[i](在第 i 个数左边的数中比它小的数的个数),ld[i](在第 i 个数左边的数中比它大的数的个数),rx[i](在第 i 个数右边的数中比它小的数的个数) ,rd[i](在第 i 个数右边的数中比它大的数的个数).然后重复的情况无非就是题目中a与c重合(rx[i]*rd[i]),a与d重合(rd[i]*ld[…
Yada Number Problem Description: Every positive integer can be expressed by multiplication of prime integers. Duoxida says an integer is a yada number if the total amount of 2,3,5,7,11,13 in its prime factors is even. For instance, 18=2 * 3 * 3 is no…
How many integers can you find Time Limit: 12000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4249 Accepted Submission(s): 1211 Problem Description Now you get a number N, and a M-integers set, you shoul…
GCD 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=1695 Description Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Since the number of choices may be…