这道题比赛时候没做出来,下来一看才发现是排序傻逼题。 把每个偏好的人做成一个vector,从大到小排序,做一个前缀和。然后将每种人数做一个桶,在桶里装每种科目选择人数为i的时候分数总和。 遍历每一维vector,把各个位置上面的vector加到sum数组中,最后sum数组里面挑出最大值。 ...
分类:
其他好文 时间:
2018-11-30 00:43:51
阅读次数:
189
#include using namespace std; #define MAXSIZE 200000 typedef int KeyType; typedef struct { KeyType key; }RedType; typedef struct { RedType r[MAXSIZE +... ...
分类:
其他好文 时间:
2018-11-29 15:37:47
阅读次数:
220
create database stuDB on ( name='stuDB_data', -- 主数据文件的逻辑名称 filename='D:\stuDB_data.mdf', -- 主数据文件的物理名称 size=5mb, --主数据文件的初始大小 maxsize=100mb, -- 主数据文件 ...
分类:
数据库 时间:
2018-11-19 17:35:36
阅读次数:
258
import threading,timeimport queueq = queue.Queue(maxsize=10)def Producer(name): count = 1 while True: q.put("骨头%s" % count) print("生产了骨头",count) count ...
分类:
其他好文 时间:
2018-11-18 18:18:22
阅读次数:
225
首先我们阅读以下源码,类名是FileInputFormat.class 根据源代码而知: max(minSize, min(maxSize,blockSize)) min(maxSize,blockSize)取maxSize,blockSize之间的最小值 max(minSize, min())取m ...
分类:
编程语言 时间:
2018-11-18 02:14:36
阅读次数:
234
#include<iostream>#include<stdio.h>#include<malloc.h> using namespace std;#define ElemType char#define MaxSize 100 typedef struct node{ ElemType data; ...
分类:
其他好文 时间:
2018-11-17 13:16:37
阅读次数:
231
package ch03; /* * 队列类 */ public class MyQueue { // 底层实现是一个数组 private long[] arr; // 有效数据大小 private int elements; // 队头 private int front; // 队尾 priva... ...
分类:
编程语言 时间:
2018-11-17 12:05:20
阅读次数:
181
/*log4net.config*/ <?xml version="1.0" encoding="utf-8" ?> <configuration> <!-- This section contains the log4net configuration settings --> <log4net> ...
分类:
Web程序 时间:
2018-11-13 18:31:48
阅读次数:
164
线性表 顺序存储结构 顺序存储结构 线性表的顺序存储结构,指的是 用一段地址连续的存储单元依次存储线性表的数据元素 三个属性 存储空间的起始位置:数组data,它的存储位置就是存储空间的存储位置 线性表的最大存储容量:数组的长度MaxSize 线性表的当前长度:length 数据长度和线性表长度的区 ...
分类:
其他好文 时间:
2018-11-11 13:52:14
阅读次数:
126
#include #include #include using namespace std; #define M 4 #define N 4 #define MaxSize 100 typedef int ElemType; typedef struct { int r; int c; ElemT... ...
分类:
其他好文 时间:
2018-11-05 19:15:02
阅读次数:
172