搬砖 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 5134    Accepted Submission(s): 1288 Problem Description   小明现在是人见人爱,花见花开的高富帅,整天沉浸在美女环绕的笙歌妙舞当中.但是人们有所不知,春风得意的小明也曾有着一段艰苦的奋斗史. 那时的小明还没剪去长发,没有信用卡没…
1005 ACM组队安排 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description   ACM亚洲区比赛结束,意味着开始备战明年的浙江省大学生程序设计竞赛了!   杭州电子科技大学ACM集训队也准备开始组队.   教练想把所有的n个队员组成若干支队伍,原则是每支队伍至少一人,最多三人.   现在问题来了:如果已知集训队队员的数量n,请你帮教练计算出…
#include<cstdio> #include<cstring> #include<cmath> #include<vector> #include<algorithm> using namespace std; +; int G[maxn][maxn]; int f[maxn]; int n; struct Egde { int u,v; int val; } e[maxn*maxn]; bool cmp(const Egde&a,…
Study Words Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 195    Accepted Submission(s): 66 Problem Description Learning English is not easy, vocabulary troubles me a lot. One day an idea cam…
Polygon Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 195    Accepted Submission(s): 41 Problem Description Give you a simple polygon and a line, and your task is to calculate the length of t…
The Country List Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2464    Accepted Submission(s): 576 Problem Description As the 2010 World Expo hosted by Shanghai is coming, CC is very honorabl…
#include<cstdio> #include<cstring> #include<map> #include<string> #include<algorithm> using namespace std; int T; +]; +]; map<string,int>m; struct dan { +]; int num; }d[+]; int sum; int tot; bool cmp(const dan&a,con…
#include<cmath> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int whp,wat,wdef,bhp,bat,bdef; char s; int main() { while(~scanf("%c",&s)) { scanf("%d%d%d",&whp,&wat,&…
#include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> #include<math.h> #include<map> #include<queue> using namespace std; +; char s[maxn][maxn]; int n,m; int c[maxn][maxn]; *maxn][*maxn]; int…
#include<cstdio> #include<algorithm> using namespace std; using namespace std; +; int a[maxn],b[maxn]; int main() { int n,m; while(scanf("%d %d",&n,&m)!=EOF) { ; i<=n; i++) scanf("%d",&a[i]); ; i<=m; i++)…
#include<cmath> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; ; long long X,K; long long basex[maxn]; long long basek[maxn]; int totx,totk; int main() { int T; scanf("%d",&T); while(T--)…
#include<iostream> #include<cstring> #include<cstdio> #include<cmath> #include<algorithm> using namespace std; struct Point { double x; double y; } p[], px[]; int n; ; int cmp(Point a, Point b) { if(abs(a.x-b.x)<eps) retur…
#include<cstdio> #include<cstring> #include<cmath> #include<string> #include<vector> #include<map> #include<algorithm> using namespace std; +][+]; int n; map<string ,int>m; int main() { while(~scanf("%d…
Problem Description There is a collector who own many valuable jewels. He has a problem about how to store them. There are M special boxes. Each box has a value. And each of the N jewels has a value too. The collector wants to store every jewel in on…
Problem Description In an apartment, there are N residents. The Internet Service Provider (ISP) wants to connect these residents with N – 1 cables. However, the friendships of the residents are different. There is a “Happy Value” indicating the degre…
Problem Description Like most of the RPG (role play game), “The Magic Tower” is a game about how a warrior saves the princess. After killing lots of monsters, the warrior has climbed up the top of the magic tower. There is a boss in front of him. The…
Problem Description As the 2010 World Expo hosted by Shanghai is coming, CC is very honorable to be a volunteer of such an international pageant. His job is to guide the foreign visitors. Although he has a strong desire to be an excellent volunteer,…
The Magic Tower Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2382    Accepted Submission(s): 615 Problem Description Like most of the RPG (role play game), "The Magic Tower" is a game a…
Pick Game Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 119    Accepted Submission(s): 20 Problem Description This is a pick game. On a n*m matrix, each gird has a value. The player could on…
01 Matrix Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 564    Accepted Submission(s): 121 Problem Description It's really a simple problem.  Given a "01" matrix with size by n*n (the ma…
Bitwise Equations Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 633    Accepted Submission(s): 335 Problem Description You are given two positive integers X and K. Return the K-th smallest po…
Happy Value Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1337    Accepted Submission(s): 392 Problem Description In an apartment, there are N residents. The Internet Service Provider (ISP) w…
Problem Description Chisa Yukizome works as a teacher in the school. She prepares many gifts, which consist of n kinds with a[i] quantities of each kind, for her students and wants to hold a class meeting. Because of the busy work, she gives her gift…
题目链接 Problem Description Today is the birthday of SF,so VS gives two strings S1,S2 to SF as a present,which have a big secret.SF is interested in this secret and ask VS how to get it.There are the things that VS tell: Suffix(S2,i) = S2[i...len].Ni is…
Equation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 92    Accepted Submission(s): 24 Problem Description Little Ruins is a studious boy, recently he learned addition operation! He was rewa…
Four Operations Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22    Accepted Submission(s): 12 Problem Description Little Ruins is a studious boy, recently he learned the four operations!Now h…
Car Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25    Accepted Submission(s): 12 Problem Description Ruins is driving a car to participating in a programming contest. As on a very tight sche…
Bomb Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10    Accepted Submission(s): 3 Problem Description There are N bombs needing exploding.Each bomb has three attributes: exploding radius ri,…
Coconuts Time Limit: 9000/4500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 524    Accepted Submission(s): 151 Problem Description TanBig, a friend of Mr. Frog, likes eating very much, so he always has dreams abou…
链接:https://www.nowcoder.com/acm/contest/163/F 来源:牛客网 2018 ACM 国际大学生程序设计竞赛上海大都会赛重现赛 F Color it 时间限制:C/C++ 3秒,其他语言6秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 There is a matrix A that has N rows and M columns. Each grid (i,j)(0 ≤ i < N,…