任意门:http://codeforces.com/contest/1073/problem/C C. Vasya and Robot time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has got a robot which is situated on an infinite Cartesian plane, i…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5178 pairs Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3090 Accepted Submission(s): 1085 Problem Description John has n points on the X axi…
题目链接 Problem Description Alice are given an array A[1..N] with N numbers. Now Alice want to build an array B by a parameter K as following rules: Initially, the array B is empty. Consider each interval in array A. If the length of this interval is le…
Problem Description John has n points on the X axis, and their coordinates are (x[i],),(i=,,,…,n−). He wants to know how many pairs<a,b> that |x[b]−x[a]|≤k.(a<b) Input The first line contains a single integer T (about ), indicating the number o…