Farming Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1375 Accepted Submission(s): 402 Problem Description You have a big farm, and you want to grow vegetables in it. You're too lazy to se
Get The Treasury Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2190 Accepted Submission(s): 669 Problem Description Jack knows that there is a great underground treasury in a secret region
C - Sugar Water 计算一下可以达到水是多少,可以到达的糖是多少 枚举水,然后加最多能加的糖,是\(min(F - i *100,E * 100)\),计算密度,和前一个比较就行 #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putch
A - Can you get AC? No #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define pb push_back #define mp make_pair using namespace std; typedef long long int64; char s[15]; int main() { scanf("%s",
题目链接: http://noi.openjudge.cn/ch0205/1253/ http://poj.org/problem?id=2251 总时间限制: 1000ms 内存限制: 65536kB 描述 You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with
题解: 模板题,地界特斯拉+堆优化 注意第一种建边 代码: #include<bits/stdc++.h> using namespace std; typedef long long ll; ,M=1e7+; ll dis[N]; int a1,b1,c3,a,b,c,a2,b2,a3,b3,T,n,m,num,l; int fi[N],zz[M],sl[M],ne[M],f[N],q[N],p; void jb(int x,int y,int z) { ne[++num]=fi[x]; f
http://acm.timus.ru/problem.aspx?space=1&num=1519 题目描述 一个 m * n 的棋盘,有的格子存在障碍,求经过所有非障碍格子的哈密顿回路个数. 输入 The first line contains the integer numbers N and M (2 ≤ N, M ≤ 12). Each of the next N lines contains M characters, which are the corresponding cells
https://darkbzoj.cf/problem/2673 有一个芯片,芯片上有N*N(1≤N≤40)个插槽,可以在里面装零件. 有些插槽不能装零件,有些插槽必须装零件,剩下的插槽随意. 要求装好之后满足如下两条要求: 1.第 i 行和第 i 列的零件数目必须一样多(1≤i≤N). 2.第 i 行的零件数目不能超过总的零件数目的 A/B(1≤i≤N,0≤A≤B≤1000,B≠0). 求最多可以另外放多少个零件(就是除掉必须放的).如果无解输出impossible. zkw费用流就是像跑最大