1005 ACM组队安排 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description   ACM亚洲区比赛结束,意味着开始备战明年的浙江省大学生程序设计竞赛了!   杭州电子科技大学ACM集训队也准备开始组队.   教练想把所有的n个队员组成若干支队伍,原则是每支队伍至少一人,最多三人.   现在问题来了:如果已知集训队队员的数量n,请你帮教练计算出…
搬砖 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 5134    Accepted Submission(s): 1288 Problem Description   小明现在是人见人爱,花见花开的高富帅,整天沉浸在美女环绕的笙歌妙舞当中.但是人们有所不知,春风得意的小明也曾有着一段艰苦的奋斗史. 那时的小明还没剪去长发,没有信用卡没…
#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--)…
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<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,…
#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 "You shall not pass!" After shouted out that,the Force Staff appered in CaoHaha's hand. As we all know,the Force Staff is a staff with infinity power.If you can use it skillful,it may help you to do whatever you want. Bu…
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…
链接: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,…
传送门:2018 ACM 国际大学生程序设计竞赛上海大都会赛 2018 ACM 国际大学生程序设计竞赛上海大都会赛重现赛2018-08-05 12:00:00 至 2018-08-05 17:00:00时长: 5小时 比赛情况 实录 难度差不多介于省赛和区域赛之间吧.开题A是计算几何,有点思路后就先放下去写签到题,B读错题WA一发,K直接套模板,然后就接着看A.之前写过类似题,没注意数据范围就头铁地交了发n3的代码,TE后才发现数据范围是之前那道十多倍,就听学长的先看D.推十分钟公式无果后打算直…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=6705 path Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1250    Accepted Submission(s): 257 Problem Description You have a directed weighted graph…
Magic boy Bi Luo with his excited tree Problem Description Bi Luo is a magic boy, he also has a migic tree, the tree has N nodes , in each node , there is a treasure, it's value is V[i], and for each edge, there is a cost C[i], which means every time…
传递 Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 42    Accepted Submission(s): 16 Problem Description 我们称一个有向图G是传递的,当且仅当对任意三个不同的顶点a,,若G中有 一条边从a到b且有一条边从b到c ,则G中同样有一条边从a到c.我们称图G是一个竞赛图,当且仅当它是一个有…