A. Nearly Lucky Number time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations con…
D. Animals time limit per test 2 seconds memory limit per test 64 megabytes input input.txt output output.txt Once upon a time DravDe, an outstanding person famous for his professional achievements (as you must remember, he works in a warehouse stori…
题目链接:http://www.codeforces.com/problemset/problem/69/A题意:给你n个三维空间矢量,求这n个矢量的矢量和是否为零.C++代码: #include <cstdio> #include <iostream> using namespace std; int x, y, z; int main() { int n, tx, ty, tz; cin >> n; while (n--) { cin >> tx >…
C. Primes on Interval time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positiv…
A. Boy or Girl time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Description Those days, many boys use beautiful girls' photos as avatars in forums. So it is pretty hard to tell the gender of…
B. Easy Number Challenge time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Let's denote d(n) as the number of divisors of a positive integer n. You are given three integers a, b and c. Your…
题目描述:There are n cities in Byteland, and the ith city has a value ai. The cost of building a bidirectional road between two cities is the sum of their values. Please calculate the minimum cost of connecting these cities, which means any two cities c…
XiaoMing likes mathematics, and heis just learning how to convert numbers between different bases , but he keeps making errorssince he is only 6 years old. Whenever XiaoMing converts a number to a new base and writes downthe result, he always writes…
信道安全 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描述 Alpha 机构有自己的一套网络系统进行信息传送.情报员 A 位于节点 1,他准备将一份情报 发送给位于节点 n 的情报部门.可是由于最近国际纷争,战事不断,很多信道都有可能被遭到监 视或破坏. 经过测试分析,Alpha 情报系统获得了网络中每段信道安全可靠性的概率,情报员 A 决定选 择一条安全性最高,即概率最大的信道路径进行发送情报. 你能帮情报员 A 找到这条信道路径吗? 输入 第一行: T 表示…
Problem E Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 635 Accepted Submission(s): 111 Problem Description 在数据维护的过程中,保持高效的数据访问和修改是非常重要的工作,这个题目就需要你用高效的手段来维护一段数据并执行不同的操作. 我们首先用如下公式生成一个矩阵A:…
表达式求值 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 假设表达式定义为:1. 一个十进制的正整数 X 是一个表达式.2. 如果 X 和 Y 是 表达式,则 X+Y, X*Y 也是表达式; *优先级高于+.3. 如果 X 和 Y 是 表达式,则 函数 Smax(X,Y)也是表达式,其值为:先分别求出 X ,Y值的各位数字之和,再从中选最大数.4.如果 X 是 表达式,则 (X)也是表达式. 例如:表达式 12*(2+3)+Smax(333,220+280) 的值…
比赛链接: http://202.197.224.59/OnlineJudge2/index.php/Contest/problems/contest_id/36 题目来源: 2014嘉杰信息杯ACM/ICPC湖南程序设计邀请赛暨第六届湘潭市程序设计竞赛 × Problem A A simple problem (求N % 1 + N % 2 + ....+ N % N, 待补) ? Problem B Path √ Problem C Range (单调栈) √ Problem…