C - A Great Alchemist Time limit : 2sec / Stack limit : 256MB / Memory limit : 256MB Problem Carol is a great alchemist. In her world, each metal has a name of 2N (N is an integer) letters long, which consists of uppercase alphabets. Carol can create…
Atcoder ABC138 A .Red or Not 一道网速题. 大于3200输出原字符串,否则就输出red. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define LL long long int a; string ch; int main() { scanf("%d",&…
Time limit : 2sec / Stack limit : 256MB / Memory limit : 256MB ProblemCarol is a great alchemist. In her world, each metal has a name of 2N (N is an integer) letters long, which consists of uppercase alphabets. Carol can create metal S3 from S1 and S…
链接:http://agc001.contest.atcoder.jp/tasks/agc001_c 题解(官方): We use the following well-known fact about trees.Let T be a tree, and let D be the diameter of the tree. • If D is even, there exists an vertex v of T such that for each vertex w inT, the dis…
我都出了F了……结果并没有出E……atcoder让我差4分上橙是啥意思啊…… C - Together 题意:把每个数加1或减1或不变求最大众数. #include<cstdio> #include<algorithm> using namespace std; int read_p,read_ca; inline int read(){ read_p=;read_ca=getchar(); ') read_ca=getchar(); +read_ca-,read_ca=getch…
D - Menagerie Time limit : 2sec / Memory limit : 256MB Score : 500 points Problem Statement Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbe…
A - K-City Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement In K-city, there are n streets running east-west, and m streets running north-south. Each street running east-west and each street running north-south cross each…