题目描述小T开办了一家机器工厂,在N(Nusing namespace std;int n,s,c,y;long long ans,mn;int main(){ scanf("%d%d",&n,&s); for(int i=1;i<=n;i++) { scanf("%d%d",&c,&y); if(... ...
分类:
其他好文 时间:
2020-07-05 20:59:53
阅读次数:
65
基本 数据类型 a) 数字 i.整数: byte(1 个字节) ,short(2 个字节),int(4个字节,整型常量默认该类型),long(8个字节) ii.浮点数: float(4 个字节) ,double(8 个字节,浮点常量默认为该类型) b) 字符char(2个字节) c) 布尔boole ...
分类:
编程语言 时间:
2020-07-05 19:29:14
阅读次数:
57
此题用滚动数组即可 #include <cstdio> #include <cstring> using namespace std; typedef unsigned long long ull; ull f[50][50]; int a[12] = {0, -1, -2, -2, -1, 1, ...
分类:
其他好文 时间:
2020-07-05 17:09:18
阅读次数:
61
手动清除实在是有点烦了,上网搜了一下,发现一个可用的方法 def clear_all(): #Clears all the variables from the workspace of the spyder application. gl = globals().copy() for var in ...
分类:
其他好文 时间:
2020-07-05 17:07:50
阅读次数:
78
不多bb 直接代码 #include<iostream> #include<cstdio> using namespace std; const long long k=5e5+5; long long a[k]; struct Segment{ long long l,r; long long s ...
分类:
其他好文 时间:
2020-07-05 17:00:43
阅读次数:
58
[Java 实例 - 连接字符串 Java 实例以下实例演示了通过 "+" 操作符和StringBuffer.append() 方法来连接字符串,并比较其性能:StringConcatenate.java 文件 public class StringConcatenate { public stat... ...
分类:
编程语言 时间:
2020-07-05 13:38:34
阅读次数:
57
[C 语言中文开发手册fmodl (Numerics) - C 中文开发手册在头文件中定义??float fmodf(float x,float y);(1)(自C99以来)double fmod(double x,double y);(2)?long double fmodl(long doubl... ...
分类:
其他好文 时间:
2020-07-05 13:15:50
阅读次数:
70
HDU 3092 题目大意 将一个数 \(s\) 写成很多数相加,求这些数的 \(lcm\) 最大 $\$ $\$ \(Solution\) 网上的题解我真是emm???直接复述一遍结论就离谱。这道题重点难道不是在发现这个结论吗?完全背包谁不会啊??忍不住吐槽了kkk 首先一定要手玩几个例子,比如 ...
分类:
其他好文 时间:
2020-07-04 22:36:37
阅读次数:
64
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define ls (l[cnt]) #define rs (r[cnt]) const int N = 100005; struct Ftree { int l[ ...
分类:
其他好文 时间:
2020-07-04 21:12:28
阅读次数:
69
01背包 http://acm.hdu.edu.cn/showproblem.php?pid=2546 余额为体积; 01背包比较明显; 因为是>=5时才能消费,所以预留5的空间,计算出在余额为m-5的情况下,所能花费的最大价钱; 记住,因为只要>=5,不管菜多贵,都能买;所以我们希望5元时买的菜最 ...
分类:
其他好文 时间:
2020-07-04 21:01:00
阅读次数:
64