题意:有一$n$个点,$m$条边的双向图,每条边都有花费和流量,求从$1$~$n$的路径中,求$max\frac{min(f)}{\sum c}$. 题解:对于c,一定是单源最短路,我们可以用dijkstra,但是这个最小流量不是很好搞,但是题目所给的数据范围较小,所以我们可以直接枚举最小流量,然后 ...
分类:
其他好文 时间:
2020-07-17 19:42:27
阅读次数:
70
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), r ...
分类:
其他好文 时间:
2020-07-17 13:55:38
阅读次数:
71
采用分治思想 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; double a,b,c,d; double f(double x) { return ...
分类:
其他好文 时间:
2020-07-17 13:39:43
阅读次数:
71
题目描述(口糊) 先给定一个长度为n的数列,然后给m次操作,每次输入b,求第b小的数。 样例输入 5 7 4 10 9 23 5 1 2 3 4 5 样例输出 4 7 9 10 23 数据范围及温馨提示 1e9 大家一定要用线段树做这道题啊! 建议大家在认真阅读一下逆序对的题解 题解传送门 于是这里 ...
分类:
其他好文 时间:
2020-07-17 13:36:55
阅读次数:
49
SSH框架是Struct+Spring+Hibernate,SSM是指的Spring-MVC+Spring+MyBatis 1、Struct和Spring-MVC:SpringMVC的控制层是Controller,Structs的控制层是Action。SpringMVC的Controller和Str ...
分类:
其他好文 时间:
2020-07-16 20:58:33
阅读次数:
56
叉乘,点乘,用结构体存cos^2 int n, ans = 1, X[N], Y[N]; struct node { double x,y; node(): node(0,0){} node(double x,double y):x(x),y(y){} bool operator < (const ...
分类:
其他好文 时间:
2020-07-16 11:50:55
阅读次数:
66
题目描述 给出一个集合和一个数m。 集合里面有n个质数。 请你求出从 1 到 m 的所有数中,至少能被集合中的一个数整除的数的个数。 输入描述: 第一行两个正整数 n 和 m 。第二行n个正整数,分别为集合中的质数。 输出描述: 输出一个整数,表示符合要求的正整数的个数。 示例1 输入 复制 3 3 ...
分类:
其他好文 时间:
2020-07-16 11:50:38
阅读次数:
68
1.区间求和 2.区间取模 3.单点修改 线段树,区间取模加一个剪枝:区间最大值<mod,不修改。其他单点取模 #include <bits/stdc++.h> using namespace std; #define debug printf("bug!!!\n"); typedef long l ...
分类:
其他好文 时间:
2020-07-16 11:50:06
阅读次数:
63
一个数最多能取8-9次根号。 #include <bits/stdc++.h> using namespace std; #define debug printf("bug!!!\n"); typedef long long ll; const int MAXN=1e5+10; const ll M ...
分类:
其他好文 时间:
2020-07-16 10:11:53
阅读次数:
74
#coding=utf-8 import sys,os ,shutil import struct import glob import time import subprocess def process_audio(file_name,to_file): command='ffmpeg -i { ...
分类:
其他好文 时间:
2020-07-16 00:27:27
阅读次数:
119