[codeforces 317]A. Perfect Pair】的更多相关文章

[codeforces 317]A. Perfect Pair 试题描述 Let us call a pair of integer numbers m-perfect, if at least one number in the pair is greater than or equal to m. Thus, the pairs (3, 3) and (0, 2) are 2-perfect while the pair (-1, 1) is not. Two integers x, y a…
\(>Codeforces\space980 D. Perfect Groups<\) 题目大意 : 设 \(F(S)\) 表示在集合\(S\)中把元素划分成若干组,使得每组内元素两两相乘的结果的都是完全平方数的最小组数 对于长度为\(n\)的序列 \(A\) ,对于每一个 \(k \, (1 \leq k \leq n)\) ,分别求出在\(A\)的所有子串中有多少 \([l, r]\) 满足 \(F(A[l, r]) = k\) $n \leq 5000, \space |A_{i}| \…
http://codeforces.com/problemset/problem/317/A 题意:给两个数字,可以两数相加去替换其中一个数字.问要做多少次,可以让两个数字钟至少一个 >= 目标数字m,输出次数,不可能的话输出-1 比较简单的题目,用来练习JAVA,代码写得有点,呵呵................ import java.util.*; public class Main{ static long max(long x , long y){ return x > y ? x…
B. Strings of Power Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/318/problem/C Description Let us call a pair of integer numbers m-perfect, if at least one number in the pair is greater than or equal to m. Thus, the pair…
题目链接:http://codeforces.com/problemset/problem/93/B B. End of Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Students love to celebrate their holidays. Especially if the holiday is th…
http://codeforces.com/contest/934 A. A Compatible Pair   time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Nian is a monster which lives deep in the oceans. Once a year, it shows up on the la…
http://codeforces.com/contest/318/problem/C #include <cstdio> #include <cstring> #include <algorithm> using namespace std; long long j; long long x,y,m; int main() { scanf("%I64d%I64d%I64d",&x,&y,&m); if(x>=m||y&…
http://codeforces.com/contest/923/problem/C Trie树 #include<cstdio> #include<iostream> using namespace std; #define N 300001 #define M 30 ,tr[N*M][],sum[N*M]; int a[N]; void read(int &x) { x=; char c=getchar(); while(!isdigit(c)) c=getchar(…
  B. Perfect Number   time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output We consider a positive integer perfect, if and only if the sum of its digits is exactly 10. Given a positive integer k…
C. Lengthening Sticks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given three sticks with positive integer lengths of a, b, and c centimeters. You can increase length of some of…