上一页 1 2 3 4 5 6 7 8 ··· 53 下一页
摘要: 老年人题解,语言python3 A Bank Robbery 题意:给你ABC,以及n个数,问你在(B,C)之间的数有多少个。 题解:对于每个数判断一下就好了嘛 x,y,z = map(int,input().split()) n = int(input()) print(len(list(filt 阅读全文
posted @ 2017-05-16 16:37 qscqesze 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Basis(基础): MSE(Mean Square Error 均方误差), LMS(LeastMean Square 最小均方), LSM(Least Square Methods 最小二乘法), MLE(MaximumLikelihood Estimation最大似然估计), QP(Quadr 阅读全文
posted @ 2017-05-15 10:14 qscqesze 阅读(695) 评论(0) 推荐(2) 编辑
摘要: 题解: 喵哈哈村的魔力源泉(1) 题解:签到题。 代码: include using namespace std; int main(){ long long a,b,c; while(cin a b c){ cout include include include include include 阅读全文
posted @ 2017-05-09 16:24 qscqesze 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 内网看到的一个小技巧,卧槽,感觉真TM厉害 函数均放到main函数内即可 def get_proxy(): url="http://www.xicidaili.com" req=urllib.request.Request(url,headers=headers) response=urllib.r 阅读全文
posted @ 2017-05-09 09:55 qscqesze 阅读(1150) 评论(0) 推荐(2) 编辑
摘要: A. Fake NP 题意:给你l,r,让你输出[l,r]里面除1以外的,出现因子数量最多的那个数。 题解:如果l==r输出l,否则都输出2 include using namespace std; int main(){ int l,r; cin l r; if(r l==0){ coutnum) 阅读全文
posted @ 2017-05-08 10:28 qscqesze 阅读(312) 评论(0) 推荐(0) 编辑
摘要: python 2.7 coding:utf 8 导入模块 import urllib2,re,urllib from bs4 import BeautifulSoup import json,time import sys reload(sys) sys.setdefaultencoding('ut 阅读全文
posted @ 2017-05-07 11:07 qscqesze 阅读(884) 评论(0) 推荐(1) 编辑
摘要: 其实呢,就是直接调用一个函数的事情。。。 coding=utf 8 from sklearn.tree import DecisionTreeClassifier from matplotlib.pyplot import from sklearn.cross_validation import t 阅读全文
posted @ 2017-05-07 11:03 qscqesze 阅读(1078) 评论(0) 推荐(1) 编辑
摘要: A Hometask 题意:给你一个字符串,然后再给你k个禁止挨在一起的字符串,问你最少删除多少个字符串,使得不会有禁忌的字符串对挨在一起。题目保证每个字符最多出现在一个禁忌中。 题解:由于每个字符只会出现在一个禁忌里面,那么就说明每个询问是独立的。对于每个询问,我们贪心的去处理就好了,就连续的禁忌 阅读全文
posted @ 2017-05-02 17:39 qscqesze 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 喵哈哈村的古怪石碑(一) 题解:暴力check一下是等比数列还是等差数列,然后输出答案即可。注意如果数据范围是1e9的话,就要快速幂了。 代码: include include include include include // define LOCAL const int N=100+10; c 阅读全文
posted @ 2017-05-02 15:58 qscqesze 阅读(314) 评论(0) 推荐(0) 编辑
摘要: A 题意:问你恰好修改一个字符,能不能使得字符串变成回文串 题解:显然直接for一遍,如果长度为偶数,那么不一样的必须是1个;如果长度为奇数,那么不一样的也可以是0个 include using namespace std; string s; int main(){ cin s; int tmp 阅读全文
posted @ 2017-04-28 19:32 qscqesze 阅读(293) 评论(0) 推荐(0) 编辑
摘要: problem: 1、 输入一个ip列表文件,文件每行为以tab键分隔的两列,分别为一个ip段的起始ip和结束ip,ip均为点分形式。要求将该文件中各ip段包含的每一个有效ip以非点分形式输出到一个文件中。 例如: 输入文件内容如下: 66.111.22.1 66.111.22.3 123.1.1. 阅读全文
posted @ 2017-04-27 14:35 qscqesze 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 喵哈哈村的秘境探险系列。 A. 实际上就是求乘积%k是否等于0,显然 a b % k = (a%k) (b%k)%k,所以边乘边取模就好了。 include using namespace std; int main(){ long long n,k; while(cin n k){ long lo 阅读全文
posted @ 2017-04-25 10:31 qscqesze 阅读(258) 评论(0) 推荐(0) 编辑
摘要: A 实际上我们for一遍就好。 坑点就是会爆int include using namespace std; const int maxn = 1e5+7; long long ans1,ans2,a[maxn],b[maxn],c[maxn]; int n; int main(){ while(c 阅读全文
posted @ 2017-04-22 22:49 qscqesze 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 哗啦啦村的奇迹果实(一) 题解:显然答案就是最大值减去最小值。 include using namespace std; const int maxn = 1e5+7; int n,a[maxn]; int main(){ while(cin n){ int x;scanf("%d",&x); in 阅读全文
posted @ 2017-04-18 19:39 qscqesze 阅读(446) 评论(0) 推荐(0) 编辑
摘要: A. Vicious Keyboard 题意:给你一个字符串,里面只会包含VK,这两种字符,然后你可以改变一个字符,你要求VK这个字串出现的次数最多。 题解:数据范围很小,暴力枚举改变哪个字符,然后check就好。 include using namespace std; int main(){ s 阅读全文
posted @ 2017-04-18 15:23 qscqesze 阅读(242) 评论(0) 推荐(0) 编辑
摘要: A. k Factorization 题意:给你一个n,问你这个数能否分割成k个大于1的数的乘积。 题解:因为n的取值范围很小,所以感觉dfs应该不会有很多种可能…… include using namespace std; long long n; int k; vector ans; void 阅读全文
posted @ 2017-04-16 15:29 qscqesze 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 喵哈哈村的四月半活动(一) 题解: 唯一的case,就是两边长度一样的时候,第三边只有一种情况。 include include include include include include include include include define INF 1000000000 using n 阅读全文
posted @ 2017-04-16 14:14 qscqesze 阅读(262) 评论(0) 推荐(0) 编辑
摘要: A Buying A House 题意:给你n个房间,妹子住在第m个房间,你有k块钱,你想买一个离妹子最近的房间。其中相邻的房间之间距离为10,a[i]=0表示已经被别人买了。 题解:扫一遍更新答案即可。 include using namespace std; const int maxn = 1 阅读全文
posted @ 2017-04-14 20:29 qscqesze 阅读(779) 评论(0) 推荐(0) 编辑
摘要: 喵哈哈村的木星传说(一) 旋转90°,找找规律就知道(x,y) (n 1 y,x) 然后输出就好了。 include using namespace std; const int maxn = 55; int n,mp[maxn][maxn]; int main(){ while(scanf("%d 阅读全文
posted @ 2017-04-11 19:17 qscqesze 阅读(379) 评论(1) 推荐(0) 编辑
摘要: A 注意答案会超过int,考虑分l,r奇数和偶数来考虑即可。 include using namespace std; long long l,r; int main(){ while(cin l r){ if(l%2==1){ l++; } if(r%2==1){ r ; } if(l r){ c 阅读全文
posted @ 2017-04-09 15:57 qscqesze 阅读(260) 评论(1) 推荐(0) 编辑
摘要: 趁着上课无聊,来补一补…… A. Numbers Joke 直接oeis就好了:http://oeis.org/search?q=numbers+joke&language=english&go=Search include using namespace std; long long p[]={ 阅读全文
posted @ 2017-04-07 16:02 qscqesze 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 其实就是把train.csv拿出来看了看,找了找规律,调了调参数而已。 找到如下规律: 1.男的容易死,女的容易活 2.一等舱活,三等舱死 3.老人死,小孩活 4.兄弟姐妹多者死 5.票价高的活 6.有Cabin记录的活 然后规则跑一跑,调一调参数,就把今天的提交次数用满了,然后跑到0.77了 im 阅读全文
posted @ 2017-04-05 14:35 qscqesze 阅读(796) 评论(0) 推荐(0) 编辑
摘要: 喵哈哈村的星星与月亮(一) 打表发现答案就等于a b%mod 注意a b可能爆longlong include using namespace std; const int mod = 1e9+7; int main(){ long long a,b,c; while(cin a b c){ cou 阅读全文
posted @ 2017-04-04 19:33 qscqesze 阅读(445) 评论(0) 推荐(1) 编辑
摘要: B. Legacy 题目连接: http://codeforces.com/contest/786/problem/B Description Rick and his co workers have made a new radioactive formula and a lot of bad g 阅读全文
posted @ 2017-03-31 15:06 qscqesze 阅读(914) 评论(5) 推荐(2) 编辑
摘要: Anastasia and pebbles 题意:你有两种框,每个框可以最多装k重量的物品,但是你每个框不能装不一样的物品。现在地面上有n个物品,问你最少多少次,可以把这n个物品全部装回去。 题解:其实就是问你得用多少次框,然后把多少次除以2就好了。每次装k的物品装回去就好了。 代码: includ 阅读全文
posted @ 2017-03-30 08:48 qscqesze 阅读(643) 评论(1) 推荐(0) 编辑
摘要: 喵哈哈村与哗啦啦村的大战(一) 最大值就是全部+3,最小值就是全部 3,注意不能降为负数。 include using namespace std; const int maxn = 105; int a[maxn],n; int main(){ while(cin n){ int ans1=0,a 阅读全文
posted @ 2017-03-28 16:06 qscqesze 阅读(297) 评论(0) 推荐(1) 编辑
摘要: A. Berzerk 题目连接: http://codeforces.com/contest/786/problem/A Description Rick and Morty are playing their own version of Berzerk (which has nothing in 阅读全文
posted @ 2017-03-27 21:06 qscqesze 阅读(504) 评论(0) 推荐(0) 编辑
摘要: [BeiJing wc2012]连连看 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=2661 Description 凡是考智商的题里面总会有这么一种消除游戏。不过现在面对的这关连连看可不是QQ游戏里那种考眼力的游戏。我们的规则是,给出 阅读全文
posted @ 2017-03-27 20:04 qscqesze 阅读(367) 评论(0) 推荐(1) 编辑
摘要: A题 喵哈哈村的数据筛选游戏 题解:这道题签到题,拿个数组记录一下这个数是否出现过即可。 include using namespace std; const int maxn = 1e5+5; int vis[maxn]; int n; int a[maxn]; int main(){ while 阅读全文
posted @ 2017-03-20 20:48 qscqesze 阅读(289) 评论(0) 推荐(0) 编辑
摘要: C. Bear and Different Names 题目连接: http://codeforces.com/contest/791/problem/C Description In the army, it isn't easy to form a group of soldiers that 阅读全文
posted @ 2017-03-19 22:34 qscqesze 阅读(378) 评论(0) 推荐(0) 编辑
摘要: B. Bear and Friendship Condition 题目连接: http://codeforces.com/contest/791/problem/B Description Bear Limak examines a social network. Its main function 阅读全文
posted @ 2017-03-19 22:21 qscqesze 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 喵哈哈村的美食面馆 签到题,就不停的if就好了。 include using namespace std; string name[5]={"niuroumian","zajiangmian","jiandanmian","fangbianmian","roujiamo"}; int p[5][3] 阅读全文
posted @ 2017-03-19 14:33 qscqesze 阅读(327) 评论(0) 推荐(0) 编辑
摘要: D. Anton and School 2 题目连接: http://codeforces.com/contest/785/problem/D Description As you probably know, Anton goes to school. One of the school subj 阅读全文
posted @ 2017-03-17 11:17 qscqesze 阅读(348) 评论(0) 推荐(0) 编辑
摘要: C. Anton and Fairy Tale 题目连接: http://codeforces.com/contest/785/problem/C Description Anton likes to listen to fairy tales, especially when Danik, Ant 阅读全文
posted @ 2017-03-17 10:37 qscqesze 阅读(755) 评论(1) 推荐(0) 编辑
摘要: B. Anton and Classes 题目连接: http://codeforces.com/contest/785/problem/B Description Anton likes to play chess. Also he likes to do programming. No wond 阅读全文
posted @ 2017-03-17 10:02 qscqesze 阅读(327) 评论(0) 推荐(0) 编辑
摘要: A Anton and Polyhedrons 题目连接: http://codeforces.com/contest/785/problem/A Description Anton's favourite geometric figures are regular polyhedrons. Not 阅读全文
posted @ 2017-03-17 09:51 qscqesze 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 喵哈哈村的魔法考试 Round 7 (Div.2) 注意!后四道题来自于周日的hihocoder offer收割赛第九场。 我建了个群:欢迎加入qscoj交流群,群号码:540667432 大概作为该oj的讨论吧,未来应该会上线一个bbs的。 喵哈哈村的七十六 签到题,直接for一遍判断就好了嘛 i 阅读全文
posted @ 2017-03-14 16:52 qscqesze 阅读(448) 评论(0) 推荐(0) 编辑
摘要: 倍增维护RMQ,nlogn预处理,O(1)查询 include using namespace std; const int maxn = 1e5+7; struct RMQ{ const static int RMQ_size = maxn; int n; int ArrayMax[RMQ_siz 阅读全文
posted @ 2017-03-12 16:51 qscqesze 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 有任何问题 直接联系QQ:475517977 喵哈哈村的代码传说 第一章 冒泡排序 第一题就是排序嘛,在ACM/OI竞赛中,我只推崇一种排序方法,就是直接调用algorithm里面的sort函数。 include using namespace std; int main(){ int n; whi 阅读全文
posted @ 2017-03-12 14:27 qscqesze 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 单层bp神经网络是解决线性可回归问题的。 该代码是论文:https://medium.com/technology invention and more/how to build a simple neural network in 9 lines of python code cc8f23647c 阅读全文
posted @ 2017-03-10 13:04 qscqesze 阅读(1600) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 53 下一页