2015弱校联盟(1) -J. Right turn】的更多相关文章

J. Right turn Time Limit: 1000ms Memory Limit: 65536KB frog is trapped in a maze. The maze is infinitely large and divided into grids. It also consists of n obstacles, where the i-th obstacle lies in grid (xi,yi). frog is initially in grid (0,0), hea…
J. Usoperanto Time Limit: 8000ms Memory Limit: 256000KB Usoperanto is an artificial spoken language designed and regulated by Usoperanto Academy. The academy is now in study to establish Strict Usoperanto, a variation of the language intended for for…
C. Censor Time Limit: 2000ms Memory Limit: 65536KB frog is now a editor to censor so-called sensitive words (敏感词). She has a long text p. Her job is relatively simple – just to find the first occurence of sensitive word w and remove it. frog repeats…
B. Carries Time Limit: 1000ms Memory Limit: 65536KB frog has n integers a1,a2,-,an, and she wants to add them pairwise. Unfortunately, frog is somehow afraid of carries (进位). She defines \emph{hardness} h(x,y) for adding x and y the number of carries…
I. Travel Time Limit: 3000ms Memory Limit: 65536KB The country frog lives in has n towns which are conveniently numbered by 1,2,-,n. Among n(n−1)/2 pairs of towns, m of them are connected by bidirectional highway, which needs a minutes to travel. The…
A. Easy Math Time Limit: 2000ms Memory Limit: 65536KB Given n integers a1,a2,-,an, check if the sum of their square root a1−−√+a2−−√+⋯+an−−√ is a integer. Input The input consists of multiple tests. For each test: The first line contains 1 integer n…
E. Rectangle Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: %lld Java class name: Main Submit Status frog has a piece of paper divided into n rows and m columns. Today, she would like to draw a rectangle whose perimeter is not gre…
题目链接 宽搜一下就行. #include <iostream> #include<cstdio> #include<cstring> #include<queue> using namespace std; int n,m; ][]; ][]={,,-,,,,,-}; ][]; bool check(int x,int y) { ||x>=n||y<||y>=m); ); ; } int prx,pry; struct node { in…
题目链接 #include<cstdio> #include<cstring> #include<algorithm> #include<stack> using namespace std; ]; int cal(int x) { int tx=x; ; while(tx) { &&tx%-pre!=-) ; pre = tx%; tx/=; } return x; } int main() { scanf("%d",&…
题目链接 https://acm.bnu.edu.cn/v3/contest_show.php?cid=8506#problem/A problem description As we know, the NTU Final PK contest usually tends to be pretty hard. Many teams got frustrated when participating NTU Final PK contest. So I decide to make the fi…