随笔分类 - 基本算法-枚举
摘要:A. Rounding time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has a non-negative inte
阅读全文
摘要:【题意】:给你一个数k,求所有使得1/k = 1/x + 1/y成立的x≥y的整数对。 【分析】:枚举所有在区间【k+1, 2k】上的 y 即可,当 1/k - 1/y 的结果分子为1即为一组解。 【代码】:
阅读全文
摘要:【题意】:乘积最大的子序列。n∈[1,10],s∈[-10,10] 【代码】:
阅读全文
摘要:【题意】:输入正整数n,用0~9这10个数字不重复组成两个五位数abcde和fghij,使得abcde/fghij的商为n,按顺序输出所有结果。如果没有找到则输出“There are no solutions for N.”。这里2<=n<=79。 【分析】: 1.因为n>=2,且abcde=fgh
阅读全文
摘要:Description A ring is composed of n (even number) circles as shown in diagram. Put natural numbers 1,2,3,...,n into each circle separately, and the su
阅读全文
摘要:A. Hungry Student Problem time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ivan's classes
阅读全文
摘要:Accept: 1040 Submit: 2314Time Limit: 1000 mSec Memory Limit : 32768 KB Accept: 1040 Submit: 2314Time Limit: 1000 mSec Memory Limit : 32768 KB Problem
阅读全文
摘要:A. Minimum Difficulty time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Minimum Difficu
阅读全文
摘要:题目描述 因为151既是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 是回文质数。 写一个程序来找出范围[a,b](5 <= a < b <= 100,000,000)( 一亿)间的所有回文质数; 输入输出格式 输入格式: 第 1 行: 二个整数 a 和 b . 输出格式:
阅读全文
摘要:A. Flipping Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Iahub got bored, so he i
阅读全文
摘要:A. Buy a Shovel time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Buy a Shovel time limi
阅读全文
摘要:A. New Year and Hurry time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. New Year and Hur
阅读全文
摘要:A. I_love_%username% time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya adores sport
阅读全文
摘要:A. IQ test time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. IQ test time limit per tes
阅读全文
摘要:A. Kefa and First Steps time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Kefa and Firs
阅读全文
摘要:A. Beautiful Year time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Beautiful Year time
阅读全文
摘要:A. Lucky Division time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Lucky Division time
阅读全文
摘要:time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output time limit per test 1 second time limit pe
阅读全文
摘要:A. Pizza Separation time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Students Vasya and Pe
阅读全文

浙公网安备 33010602011771号