现在位置: 首页 > Qkwzfpyu发表的所有文章
  • 11月
  • 08日
综合 ⁄ 共 1426字 评论关闭
就是小孩子玩游戏 #include <iostream> #include <cstdio> #include <cstring> #include <string> #include <algorithm> using namespace std; bool cmp(string a,string b) { return (a+b)>(b+a); } int main() { //freopen("in","r",stdin); int i,n; string a[100]; while(cin>>n&&n) { for(i=0;i<n;i++) cin>>a[i]; sort(a,a+n,cmp); f......
阅读全文
  • 09月
  • 25日
综合 ⁄ 共 90字 评论关闭
Emacs的几个概念: buffer window frame mode Isearch 参考: Emacs中文网 http://emacser.com/to-emacs-beginner.htm
阅读全文
  • 09月
  • 03日
综合 ⁄ 共 3266字 评论关闭
题意:给定n,k,m分别代表天数,每天上的课,以及科目数。             给定每门课的学分,已经基础分数。             给定n天每天有哪些课能学。             求如何安排复习,使得GPA尽可能大且没有挂科,算出GPA。 思路:最大费用最大流。定义函数f(score,credit)=credit×(4-3.0/1600×(100-score)^2)。每一天向汇点连边,容量为k,费用0;  每门课 与每天根据是否在当天能上连边,容量为k,费用为0; 源点向每门课连边,若基础分score小于60,则与源点连一条流量60-score、费用 inf的边,保证优先到达60,接着从源点与该课程连40条流......
阅读全文
  • 06月
  • 07日
综合 ⁄ 共 1285字 评论关闭
template <class T, class Container = deque<T> > class queue; FIFO queue queues are a type of container adaptor, specifically designed to operate in a FIFO context (first-in first-out), where elements are inserted into one end of the container and extracted from the other. queues are implemented as containers adaptors, which are classes that use an encapsulated object of a specific container class as its underlying container, providing a specific set of member functions to a......
阅读全文
  • 05月
  • 21日
综合 ⁄ 共 10491字 评论关闭
虚拟存储器是建立在主存--辅存物理结构基础上,有附加的硬件装置及操作系统存储管理软件组成的一种存储体系。  顾名思义,虚拟存储器是虚拟的存储器,它其实是不存在的,而仅仅是由一些硬件和软件管理的一种“系统”。他提供了三个重要的能力:1,它将主存看成一个存储在磁盘上的地址空间的高速缓存,在主存中只保存活动区域,并根据需要在磁盘和主存之间来回传送数据(这里存在“交换空间”以及“页面调度”等概念),通过这种方式,高效地利用主存;2,它为每个进程提供了统一的地址空间(以虚拟地址编址),从而简化了存储器管理;3......
阅读全文
  • 05月
  • 08日
数据库 ⁄ 共 3866字 评论关闭
   mysql中有一个explain 命令可以用来分析select 语句的运行效果,例如explain可以获得select语句使用的索引情况、排序的情况等等。除此以外,explain 的extended 扩展能够在原本explain的基础上额外的提供一些查询优化的信息,这些信息可以通过mysql的show warnings命令得到。下面是一个最简单的例子。首先执行对想要分析的语句进行explain,并带上extended选项mysql> explain extended select * from account\G;*************************** 1. row ***************************           id: 1select_type: SIMPLE       ......
阅读全文
  • 04月
  • 01日
综合 ⁄ 共 1018字 评论关闭
          (原创文章,转载请注明出处)          今天在回头看logistic回归的时候,无意中看到了最小二乘法,突然之间好像对概率的一些基本概念有了一层新的了解,下面就来总结下这个问题。          假设我讨论的是个简单的线性回归,                                               y为output, 为input,为我要训练的参数,可以看出这是一个最简答的线性回归。          由于训练集的数量多于参数的个数,所以我训练的参数即使是用训练集来测试的话也是有误差的,最后的解空间肯定要投影到我的这个列空间(详见mit线性代数公开课......
阅读全文
  • 10月
  • 27日
编程语言 ⁄ 共 1536字 评论关闭
一.最大似然估计     选择一个(一组)参数使得实验结果具有最大概率。 A. 如果分布是离散型的,其分布律,是待估计的参数,这里我们假设为已知量,则:设X1, X2, ... , Xn 是来自于X的样本,X1,X2,...Xn的联合分布律为:            (1)      设x1,x2,...xn是X1,X2,..Xn的一个样本值,则可知X1,..Xn取x1,..,x2的概率,即事件{X1 = x1,...,Xn=xn}发生的概率为:             (2)      这里,因为样本值是已知的,所以(2)是的函数,称为样本的似然函数。      最大似然估计:已知样本值x1,...xn,选取一组参数,使概率达到最大值,此......
阅读全文
  • 09月
  • 30日
综合 ⁄ 共 573字 评论关闭
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water. Note: You may not slant the container. public class Solution { public int maxArea(int[] height) { if(height==null || height.length<=1) return 0; ......
阅读全文
  • 06月
  • 08日
综合 ⁄ 共 3089字 评论关闭
  IPsec SA creation steps  There are two steps on the IPsec SA creation, phase 1 is to creat IKE-SA, and phase 2 is to creat IPSEC-SA, the phase2 will be protected by phase 1. phase 1 creat a security tunnel to protect phase2. step 1:  creat IKE-SA,  there are two modes on this step, the major is main mode, which including six messages;       1,&2, to negotiate the security policy, 1,initiator send all type policys supported to remote, and if remote search one of them which it support......
阅读全文
  • 05月
  • 28日
综合 ⁄ 共 1343字 评论关闭
1. 安装启动 PL/SQL 错误 eg: ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务 的解决方法   解决方法: 修改文件 D:\app\Feihong247\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora 如下: 源文件: # listener.ora Network Configuration File: D:\app\Feihong247\product\11.2.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = D:\app\Feihong247\product\11.2.......
阅读全文
  • 04月
  • 24日
综合 ⁄ 共 1028字 评论关闭
明明的烦恼简化版。 #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<cmath> #define inf 0x7fffffff #define ll long long using namespace std; inline int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } int n,m,tot,cnt,d[151],num[151],pri[151]; ll s[25],ans=1; ......
阅读全文