George is a cat, so he really likes to play. Most of all he likes to play with his array of positive integers b. During the game, George modifies the array by using special changes. Let's mark George's current array as b1, b2, ..., b|b| (record |b| denotes the current length of the array). Then one change is a sequence of actions: Choose two distinct indexes i and j (1 ≤ i, j ≤ |b|; i ≠ j), such that bi ≥ bj.Get number&nbs 继续阅读 >>

楚东方 16/12/24 16:28:34
Hongcow is ruler of the world. As ruler of the world, he wants to make it easier for people to travel by road within their own countries. The world can be modeled as an undirected graph with n nodes and m edges. k of the nodes are home to the governments of the k countries that make up the world. There is at most one edge connecting any two nodes and no edge connects a node to itself. Furthermore, for any two nodes corresponding to governm 继续阅读 >>

楚东方 16/12/24 16:22:08
C - Alyona and mex Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 740C Description Alyona's mother wants to present an array of n non-negative integers to Alyona. The array should be special. Alyona is a capricious girl so after she gets the array, she inspects m of its subarrays. Subarray is a set of some subseque 继续阅读 >>

楚东方 16/11/24 21:50:12
链接 题意 求一个数组的最小公倍数,直接套模板. #include<stdio.h> #define ll long long using namespace std; const int maxn=100; ll f[maxn]; ll n; inline ll gcd(ll a,ll b){ while(b){ ll t=a%b; a=b; b=t; } return a; } inline ll lcm(ll a,ll b){ return (a*b/gcd(a,b)); } ll nlcm(ll *f,int n){ if(n==0) return f[0]; return lcm(f[n-1],nlcm(f,n-1)) ; } int main(){ scanf("%lld",&n); for(ll i=0;i< 继续阅读 >>

余海 16/10/11 15:58:17
B - Romantic Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Description The Sky is Sprite.  The Birds is Fly in the Sky.  The Wind is Wonderful.  Blew Throw the Trees  Trees are Shaking, Leaves are Falling.  Lovers Walk passing, and so are You.  ................................Write in English class by yifenfei    Girls are 继续阅读 >>

楚东方 16/09/28 18:11:44