- 博客(19)
- 收藏
- 关注
原创 Kriging(克里金)算法 pyhton 基于pykriging包实现
Kriging算法一种空间插值算法,可以根据数据拟合一个曲面,可以用于预测数值,帮助颜色插值等。pykriging官网数据X_train = [] # position - 位置,里面的内容是[x, y]y_train = [] # value - 权重,对应上面每一个位置的权重Kriging模型训练kriging_model = kriging(X_train, y_train,...
2020-02-29 00:28:16 10610 23
原创 python - pandas - pd.read_csv()读入有中文的csv
正常读入有中文内心崩溃。。。然后pd.read_csv(add, engine=‘python’)完美解决。
2020-02-26 20:10:35 972
原创 Codeforces Round #624 (Div. 3)题解
写在前面: 很久没有好好打,松懈了,只打出三道,而且有错误,第四道是经典枚举,没想到是很不应该的。A. Add Odd or Subtract Eventime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given t...
2020-02-25 00:55:48 2407 7
原创 PAT(A)1077 Kuchiguse (20point(s))
Sample Input3Itai nyan~Ninjin wa iyadanyan~uhhh nyan~Sample Outputnyan~思路:找最后有几位会重复,暴力就行。注意输入。代码#include <iostream>#include <algorithm>#include <cstdio>#include &l...
2020-02-12 22:29:41 137
原创 Codeforces Round #618 (Div. 2)(题解)
A. Non-zerotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGuy-Manuel and Thomas have an array a of n integers [a1,a2,…,an]. In one step they ...
2020-02-10 00:46:40 753
原创 python 截取XML中bndbox的坐标中的图像,另存为jpg
文件目录Annotations中是XML文件。JPEGImages中是对应的JPG文件XML文件要截取bndbox坐标中的内容。python代码# -*- coding: utf-8 -*-# @Time : 2020/2/8 22:14# @Author : SanZhi# @File : get_xml.py# @Software: PyCharmimp...
2020-02-08 23:00:35 1279 2
原创 PAT(A)1063 Set Similarity (25point(s))
Sample Input33 99 87 1014 87 101 5 877 99 101 18 5 135 18 9921 21 3Sample Output50.0%33.3%思路:判重,然后算重复率。我本来想用map判重,最后一个点会超时,set在插入的时候就可以直接去重。代码#include <iostream>#include <...
2020-02-08 22:50:54 121
原创 Codeforces Round #617 (Div. 3)(题解)
写在前面: 啊啊啊!又是思路对了写不出来。。。掉分场。。。A. Array with Odd Sumtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a consisting of n i...
2020-02-05 22:45:16 492
原创 Codeforces Round #616 (Div. 2)(题解)
写在前面: 疫情严重,希望武汉与中国一起加油。这次就做出两题,第三题没读完,实在是比较慢。A. Even But Not Eventime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet’s define a number ebne...
2020-02-03 11:02:22 3583
原创 PAT(A)1121 Damn Single (25point(s))
Sample Input311111 2222233333 4444455555 66666755555 44444 10000 88888 22222 11111 23333Sample Output510000 23333 44444 55555 88888思路:map记录输出。代码#include <iostream>#include <...
2020-02-02 11:23:28 136
原创 PAT(A)1141 PAT Ranking of Institutions (25point(s))
Sample Input10A57908 85 AuB57908 54 LanXA37487 60 auT28374 67 CMUT32486 24 hypuA66734 92 cmuB76378 71 AUA47780 45 lanxA72809 100 pkuA03274 45 hypuSample Output51 cmu 192 21 au 192 3...
2020-02-02 11:21:47 163
原创 PAT(A)1040 Longest Symmetric String (25point(s))
Sample InputIs PAT&TAP symmetric?Sample Output11思路:判断最长回文串。代码#include <iostream>#include <algorithm>#include <cstdio>#include <string>#include <cstring&g...
2020-02-02 11:20:10 98
原创 PAT(A)1052 Linked List Sorting (25point(s))
Sample Input5 0000111111 100 -100001 0 2222233333 100000 1111112345 -1 3333322222 1000 12345Sample Output5 1234512345 -1 0000100001 0 1111111111 100 2222222222 1000 3333333333 100000 -...
2020-02-02 11:18:28 139
原创 PAT(A)1073 Scientific Notation (20point(s))
Sample Input+1.23400E-03Sample Output0.00123400思路:模拟一下就可。代码#include <iostream>#include <algorithm>#include <cstdio>#include <string>#include <cstring>#in...
2020-02-02 11:15:35 194
原创 PAT(A)1144 The Missing Number (20point(s))
Sample Input105 -25 9 6 1 3 4 2 5 17Sample Output7思路:排序后找到最靠近的缺少的数,注意第一个大于1就是1.代码#include <iostream>#include <algorithm>#include <cstdio>#include <string>#inclu...
2020-02-02 11:13:40 129
原创 PAT(A)1124 Raffle for Weibo Followers (20point(s))
Sample Input9 3 2Imgonnawin!PickMePickMeMeMeeeLookHereImgonnawin!TryAgainAgainTryAgainAgainImgonnawin!TryAgainAgainSample OutputPickMeImgonnawin!TryAgainAgain思路:map记录,如果第一个就大了则是ke...
2020-02-02 11:11:23 138
原创 PAT(A)1125 Chain the Ropes (25point(s))
Sample Input810 15 12 3 4 13 1 15Sample Output14思路:贪心,然后求不大于的最小值。代码#include <iostream>#include <algorithm>#include <cstdio>#include <string>#include <cstrin...
2020-02-02 11:09:03 115
原创 PAT(A)1109 Group Photo (25point(s))
Sample Input10 3Tom 188Mike 170Eva 168Tim 160Joe 190Ann 168Bob 175Nick 186Amy 160John 159Sample OutputBob Tom Joe NickAnn Mike EvaTim Amy John思路:排序求解。代码#include<iostream>...
2020-02-02 11:06:49 94
原创 PAT(A)1132 Cut Integer (20point(s))
Sample Input3167334233312345678Sample OutputYesNoNo思路:可能要大数,所以直接上python。模拟题意。代码# -*- coding: utf-8 -*-# @Time : 2020/2/1 21:11# @Author : SanZhi# @File : PAT.py# @Software...
2020-02-02 11:04:53 117
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人