Pythagorean Triples 题目链接: http://codeforces.com/contest/707/problem/C Description Katya studies in a fifth grade. Recently her class studied right triangles and the Pythagorean theorem. It appeared, that there are triples of positive integers such th…
Problem A Arrays 思路:水一水. #include<bits/stdc++.h> using namespace std; ; int n1,n2,k,m,a[N],b[N]; int main() { scanf("%d%d",&n1,&n2); scanf("%d%d",&k,&m); ;i<=n1;i++) scanf("%d",&a[i]); ;i<=n2;i…
A. Watching a movie time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have decided to watch the best moments of some movie. There are two buttons on your player: Watch the current minute…
D. Minimization time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You've got array A, consisting of n integers and a positive integer k. Array A is indexed by integers from 1 to n. You…
C. Gerald's Hexagon Time Limit: 2 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/559/problem/A Description Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he me…
A. Pasha and Stick 题目连接: http://www.codeforces.com/contest/610/problem/A Description Pasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have some positive…