A. Arpa and a research in Mexican wave time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Arpa is researching the Mexican wave. There are n spectators in the stadium, labeled from 1 to n. They…
题意:给你五维空间内n个点,问你有多少个点不是坏点. 坏点定义:如果对于某个点A,存在点B,C,使得角BAC为锐角,那么A是坏点. 结论:如果n维空间内已经存在2*n+1个点,那么再往里面添加任意多个点,就会导致所有点都变成坏点. 容易看出来(?),把2*n+1个点分别放在原点处和每个坐标轴的正负半轴上各一个比较优. 所以n>11时,直接输出零,否则暴力枚举. #include<cstdio> using namespace std; typedef long long ll; stru…
Arpa has found a list containing n numbers. He calls a list bad if and only if it is not empty and gcd (see notes section for more information) of numbers in the list is 1. Arpa can perform two types of operations: Choose a number and delete it with…
You are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two points coincide. We will call point a bad if there are different points b and c, not equal to a, from the given set such that angle between vectors and …
Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old position o…
Arpa is researching the Mexican wave. There are n spectators in the stadium, labeled from 1 to n. They start the Mexican wave at time 0. At time 1, the first spectator stands. At time 2, the second spectator stands. ... At time k, the k-th spectator…
昨晚打得小号,虽然很菜,可是还是涨了些rating A. Arpa and a research in Mexican wave time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Arpa is researching the Mexican wave. There are n spectators in the stadium,…
A. Even Subset Sum Problem 题意 给出一串数,找到其中的一些数使得他们的和为偶数 题解 水题,找到一个偶数或者两个奇数就好了 代码 #include<iostream> #include<cstdio> #include<cstring> #define def 110 using namespace std; long a[def]; int main() { long _,ans0,ans1,ans2,n,i; for(scanf(&quo…
A. Right-Left Cipher time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarp loves ciphers. He has invented his own cipher called Right-Left. Right-Left cipher is used for strings. To encr…
C. Did you mean... time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search…
B. Which floor? time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output In a building where Polycarp lives there are equal number of flats on each floor. Unfortunately, Polycarp don't remember how…
A. k-rounding time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output For a given positive integer n denote its k-rounding as the minimum positive integer x, such that x ends with k or more zeros i…
地址:http://codeforces.com/contest/872/problem/D 题目: D. Something with XOR Queries time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output This is an interactive problem. Jury has hidden a permutati…
地址:http://codeforces.com/contest/782/problem/E 题目: E. Underground Lab time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The evil Bumbershoot corporation produces clones for gruesome experimen…