Close Enough Computations 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2193 Descriptionww.co The nutritional food label has become ubiquitous. A sample label is shown to the right…
题意:略. 析:不解释,水题. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #include <cstring> #include <set>…
就是统计入度为0 的点 和 出度为0 的点  输出 大的那一个,, 若图中只有一个强连通分量 则输出0即可 和https://www.cnblogs.com/WTSRUVF/p/9301096.html  这题差不多  poj1236 #include <iostream> #include <cstdio> #include <sstream> #include <cstring> #include <map> #include <set…
题意:n个工人,有n件工作a,n件工作b,每个工人干一件a和一件b,a[i] ,b[i]代表工作时间,如果a[i]+b[j]>t,则老板要额外付钱a[i]+b[j]-t;现在要求老板付钱最少: 析:贪心策略,让大的和小的搭配,小的和大的搭配,是最优的. #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include &l…
Dice Cup 题目链接: http://acm.hust.edu.cn/vjudge/contest/127406#problem/D Description In many table-top games it is common to use different dice to simulate random events. A "d" or "D" is used to indicate a die with a specific number of fa…
给出c 个竞争者.v 个投票人.每个投票人的投票顺序.问你谁会胜出.在第几轮.完全是个水题.比赛的时候debug接近两个点没过.因此差点放弃了整场比赛.猜测是错在找最大和第二大的序号哪里错的.因为我换了一种方法就AC了. 以后该尝试着删掉debug不过的代码.重写.最近比赛总是被虐成狗.不知道是不是被失望了.或者. 好好努力吧.只是希望自己每次都能有所进步就好了.总是行走在路上.其实很难. #include<stdio.h> #include<string.h> #include&…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049    Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
CSU 1772 漫漫上学路 Time Limit: 1000MS   Memory Limit: 131072KB   64bit IO Format: %lld & %llu Submit Status Description 对于csuxushu来说,能够在CSU(California State University)上学是他一生的荣幸.CSU校园内的道路设计的十分精巧,由n+1条水平道路和n+1条竖直道路等距交错而成,充分体现了校园深厚的文化底蕴.然而不幸的是CS市每到夏季,天降大雨,…
1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 154  Solved: 112[Submit][Status][Web Board] Description 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换. Input 一个3x3的矩阵 Output 转置后的矩阵 Sample Input 1 2 3 4 5 6 7 8 9 Sample Output 1 4 7…
DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first 20 humble numbers. Write a program to find and print…