首页 > TAG信息列表 > 201612

CCF 201612-2 工资计算

读完题马上就想到了二分答案,但是就是写了半天才写出来。 在二分的时候精度的缺失是问题所在。 #include<iostream> using namespace std; int k; double Cal(double A) { double n = A-3500 , ans = 0; if(A <= 3500) return A; if(n > 80000) { ans += (n-8

201612-5 卡牌游戏

**根据题目样例解释得到每种卡牌拥有状态之间的关系,然后转换成等式,高斯消元是2^(3n) ** 80分超时代码: #include <iostream> #include <algorithm> #include <cstring> #include <vector> #include <queue> #define ls (u<<1) #define rs (u<<1|1) #define mid (l+r>

⭐⭐201612-3 权限查询

70分代码,全部用vector来存储的 #define _CRT_SECURE_NO_WARNINGS 1 #include<iostream> #include<cstdio> #include<string> #include<vector> #include<queue> #include<stack> #include<algorithm> #include<map> #include<set&g

CCF 201612-1

问题描述 在一个整数序列a1, a2, …, an中,如果存在某个数,大于它的整数数量等于小于它的整数数量,则称其为中间数。在一个序列中,可能存在多个下标不相同的中间数,这些中间数的值是相同的。   给定一个整数序列,请找出这个整数序列的中间数的值。 输入格式 输入的第一行包含了一

CCF CSP 201612-3权限查询(c++100)

CCF CSP 201612-3权限查询 按题意模拟,一层层嵌套,有注释 #include<iostream> #include<map> #include<string> #include<algorithm> using namespace std; map<string,int>category,cy; map<string,map<string, int> >role; map<string,map<

201612-3 权限查询 100分 109ms

#include<iostream> #include<map> #include<set> #include<cstring> using namespace std; int main(){ int p,r,u,q; string s; map<string,int>P;//权限名 等级 map<pair<string,string>,int>M;//角色 权限名 map<string,set<s

csp 201612-1 中间数

//得分100#include<iostream>using namespace std;int main(){ int n; cin>>n; int* a=new int[n]; for(int i=0;i<n;i++) cin>>a[i]; int result=-1; for(int j=0;j<n;j++){ int mcount=0,lcount=0; for

ccf——201612-1中间数

问题描述   在一个整数序列a1, a2, …, an中,如果存在某个数,大于它的整数数量等于小于它的整数数量,则称其为中间数。在一个序列中,可能存在多个下标不相同的中间数,这些中间数的值是相同的。  给定一个整数序列,请找出这个整数序列的中间数的值。 输入格式   输入的第一行包含

网络OSI和TCP/IP参考模型详解

网络模型 对应协议  转载自: https://www.2cto.com/kf/201612/576253.html