自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(67)
  • 收藏
  • 关注

原创 【YOLOV7】not enough values to unpack (expected 3, got 1)

在autodl上训练的时候出现这个问题,本地跑是ok的。报错在dataloader那个位置,应该是数据集的问题。尝试把cache删掉重新生成,还是会有warning。估计是下数据集的时候文件损坏了?重新下了一遍数据集,再次运行就ok了。

2023-02-26 00:18:40 1910 5

原创 【Unity】LOD

LOD是Level Of Detais 多层次细节视角离近时,我们让物体显示精细度高的模型视角离远时,我们让物体显示精细度低的模型节省性能的开销在游戏场景中,根据摄像机与模型的距离,来决定显示哪一个模型,一般距离近的时候显示高精度多细节模型,距离远的时候显示低精度低细节模型Unity优化——LOD技术Unity3D游戏开发如何优化性能?—— LOD技术...

2021-04-06 22:00:40 275

原创 【Unity】Getxxx is not allowed to be called from a ScriptableObject constructor

var foo = 'bar';Getxxx is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'FGConsole'.See "Script Serialization" page in the Unity Manual for further d

2021-03-20 17:29:50 2920

原创 【PAT】7-3 Postfix Expression (25) +1130 Infix Expression (25)

俺也不知道对不对,两个给的样例是过了的没有左结点但有右结点的结点要先输出,这是为什么?#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<algorithm>#include<string>using namespace std;struct Node{ string key; int lchild,rchild; bool flag;//设定flag是因为题结点没有左节点,但...

2020-07-17 21:59:42 311

原创 【PAT】1147 Heaps (30分) [heap]

1147 Heaps (30分)#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <vector>#include<string>using namespace std;//m个堆,每个堆n个结点//输出最大/最小/不是堆 + 后序遍历vector<int>v;int m, n;void postOrder(int index){ if (index > n)

2020-07-17 12:15:36 119

原创 【PAT】1155 Heap Paths (30) [heap]

1155 Heap Paths (30分)#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <vector>#include<string>using namespace std;//完全二叉树层序求路径(右到左)dfs//判断是否为大根/小根堆vector<int>v;int h[1001], n, Min = 1, Max = 1;void dfs(int inde

2020-07-17 00:14:49 113

原创 【PAT】7-1 Good in C (20) [print]

给出26个字母图形和一个字符串,输出字符串的图形没在pat上提交过,不知道能不能ac用vector[26][7]存字母,vector[i][j]代表字母j的第j行#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <vector>#include<string>using namespace std;int main() { vector<string> v[26];

2020-07-16 18:01:56 116

原创 【PAT】1052 Linked List Sorting (25) [list]

1052 Linked List Sorting (25分)链表的地址一定记得printf("%05d\n")否则会有部分测试点过不了#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<algorithm>#include<vector>using namespace std;struct Node{ int address; int key; int next; bool flag

2020-07-15 19:08:31 83

原创 【PAT】1032 Sharing (25) [list]

1032 Sharing (25分)#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<map>#include<string>#include<vector>using namespace std;struct node { char key; int next; bool flag;}node[100000];int main(){ //freopen("inp

2020-07-15 18:00:42 94

原创 【PAT】1138 Postorder Traversal (25) [tree][traversal]

1138 Postorder Traversal (25分)Given the preorder and inorder traversal sequences, you are supposed to output the first number of the postorder traversal sequence先序中序转后序,输出后序第一个结点#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<vector

2020-07-14 16:16:51 80

原创 【PAT】1020 Tree Traversals (25) [tree][traversal]

1020 Tree Traversals (25分)后序+中序转层序node保存结点标号,按标号升序输出//#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<vector>#include<algorithm>using namespace std;struct node{ int id;//按完全二叉树的下标 int val;//值};bool cmp(node a, nod

2020-07-14 15:52:55 117

原创 【PAT】1004 Counting Leaves (30) [tree][dfs]

1004 Counting Leaves (30分)使用dfs,每搜索到一个叶子结点leaf[层数]++,最后输出leaf数组即可#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<vector>using namespace std;//求每层叶子结点int n, m;// 0 < N < 100, the number of nodes in a tree// M(< N),

2020-07-10 15:53:20 91

原创 【PAT】1034 Head of a Gang (30) [graph][dfs]

1034 Head of a Gang (30分)牛客 1034 Head of a Gang (30分)测试点3排序后正确其他测试点…快被整疯了,牛客上可以过PAT过不了测试点1和2应该是输出0,其他的应该是输出格式问题?#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<string>#include<vector>#include<map>using namespa

2020-07-09 15:12:17 134

原创 【PAT】1021 Deepest Root (25) [graph][dfs]

dfs统计连通分量数dfs找到最深点记作A,再次以A为起点dfs,得到Deepest Root

2020-07-07 15:42:06 82

原创 【PAT】1013 Battle Over Cities (25) [graph][dfs]

1013 Battle Over Cities (25分)连通图去除某个顶点,需要加几条路径使其再次连通思路连通图去除某个顶点 --> 变成k个连通分量 --> k个连通分量需要增加k-1条路线使其再次连通即:求出去掉顶点后,求出图的连通分量数即可知识点dfs查找连通分量数k个连通分量需要增加k-1条路线使其再次连通fill(visited, visited + 1000, false);cin / cout 会超时,换成scanf / printf//参考柳神//

2020-07-02 17:42:26 85

原创 【PAT】1015 Reversible Primes (20) [prime][Binary conversion]

1015 Reversible Primes (20分)进制参考bool isPrime(int n)while(cin >> n && n>=0)输入小于零结束for (int i = 0; i < len; i++) n = n * d + arr[i];///化十进制①进制转换自己实现int len = 0, arr[100];//进制转换 do { arr[len++] = n % d; n = n / d; } while

2020-06-30 17:12:00 112

原创 【PAT】1005 Spell It Right (20) [string]

1005 Spell It Right (20分)忘记这种写法了,string arr[10] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};//#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<string>using namespace std;int main(){ //fre

2020-06-30 16:19:58 98

原创 【PAT】1152 Google Recruitment (20) [string][prime]

1152 Google Recruitment (20分)isPrime输出字符串,不要输出转换后的int//#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<string>using namespace std;bool isPrime(int n){ if (n == 0 || n == 1) return false; for (int i = 2; i*i <= n; i++)

2020-06-29 16:54:58 157

原创 【PAT】1108 Finding Average (20) [string]

1108 Finding Average (20分)strlen在cstring里sscanf从字符串读进与指定格式相符的数据sprintf格式化数据//#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<cstring>using namespace std;int main(){ //freopen("input.txt","r", stdin); int N,cnt = 0; doub

2020-06-28 19:17:54 99

原创 【PAT】1077 Kuchiguse (20)[string]

1077 Kuchiguse (20分)只能通过第一个测试点,在牛客上看了其他测试点,在我的机器上可以跑出来,但是牛客上的答案就不对....这到底是为什么!!!reverse头文件 algorithmfind//#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<string>#include<algorithm>using namespace std;int main()

2020-06-28 17:11:47 113

原创 【错误】This function or variable may be unsafe. Consider using freopen_s instead.

#define _CRT_SECURE_NO_WARNINGS

2020-06-25 21:47:15 1763

原创 【PAT】1073 Scientific Notation (20) [string]

1073 Scientific Notation (20分)PAT上有个例子没跑通,没找出来,只是部分正确18分//#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include <cstdlib>#include<string>using namespace std;int main(){ //freopen("input.txt","r",stdin); string s; cin &gt

2020-06-25 21:37:41 112

原创 【Java】异常处理

异常的原因数组下标越界访问不存在文件异常处理机制输入三角形面积海伦公式java TestException控制台显示数组访问越界数字格式异常NumberFormatExceptiontry catch()Java异常类体系异常类层次Throwable是所有异常类的父类(也是Object的子类),Java中只有Throwable类及其子类的对象才能由异常处理机制处理。E...

2020-06-25 15:08:20 155

原创 【PAT】1061 Dating (20) [string]

1061 Dating (20分)发现了个函数isalpha / isdigit ,刚开始一直写的是>'A'这种string week[7] = { "MON ", "TUE ", "WED ","THU ","FRI " ,"SAT ","SUN " }; week[time[0] - 65];printf("%02d", pos);对输出格式控制//#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<

2020-06-25 15:02:38 117

原创 【PAT】1001 A+B Format (20) [string]

1001 A+B Format (20)(i + 1) % 3 == len % 3//#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<string>using namespace std;int main(){ //freopen("input.txt", "r",stdin); int a, b,len; cin >> a >> b; string s = .

2020-06-24 19:27:08 120

原创 【PAT】1035 Password (20) [string]

1035 Password (20分)注意输出的is / are 和 account / accounts//#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<string>#include<vector>using namespace std;int main(){ //freopen("input.txt","r",stdin); vector<string>v; i

2020-06-24 19:24:44 137

原创 【PAT】1054 The Dominant Color (20) [map]

Behind the scenes in the computer’s memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the dominant color. A strictly dominant color takes more than

2020-05-20 23:23:06 87

原创 【PAT】1081 Rational Sum (20) [gcd]

题目描述:Given N rational numbers in the form “numerator/denominator”, you aresupposed to calculate their sum.输入描述:Each input file contains one test case. Each case starts with apositive integer N (<=100), followed in the next line N rationalnumber

2020-05-19 20:08:42 135

原创 【PAT】害死人不偿命的(3n+1)猜想

用迭代来解决的#include<iostream>//using namespace std; int Callatz(int a,int num){ if(a == 1) return num; if(a%2 != 0) a = (a*3+1); a /= 2; num += 1; Callatz(a,num);}int main(){ int...

2020-04-29 13:52:29 140

原创 【错误】LNK2019: 无法解析的外部符号 _sscanf / _vsprintf,该符号在函数中被引用

出现原因:VS2017没有可以链接的标准库文件,所以要专门添加标准库文件来链接标准库中的函数解决方案:1.打开项目属性 - 连接器 - 附加依赖项2.右键编辑 - 添加代码legacy_stdio_definitions.lib...

2020-03-17 15:10:35 3491 2

原创 【错误】“/ZI”和“/Gy-”命令行选项不兼容

把“调试信息格式”换几个程序库试试

2020-01-21 21:42:38 840

原创 【错误】LNK2026 模块对于SAFESEH映像是不安全的

连接错误解决方法:1.打开该项目的“属性页”对话框。2.单击“链接器”文件夹。3.单击“命令行”属性页。4.将 /SAFESEH:NO 键入“其他选项”框中,然后点击应用。...

2020-01-21 21:41:27 227

原创 【Java】为什么long的精度低于float?

long整型数在内存中占用8个字节共64位,它表示的数值有2的64次方,平分正负,数值范围是负2的63次方到正2的63次方-1。float在内存中占4个字节,共32位,但是浮点数在内存中是这样的:V=(-1)^s * M * 2^E,虽然只用到了4个字节,但是浮点数却比长整型的最大值要大。...

2019-12-05 09:33:01 393

原创 【计算机图形学】Cohen-Sutherland裁剪算法+中点分割直线段裁剪算法

编码规则Cohen-Sutherland算法又叫编码裁剪算法,主要将界面分为9个编码区4位二进制编码D3 D2 D1 D0x < xwl : D0 = 1 否则为0x > xwr : D1 = 1 否则为0y > ywb : D2 = 1 否则为0y < ywt : D3 = 1 否则为0总结一下就是 : 裁剪窗口内编码为0,外为1 。只要有1,必在裁剪窗口...

2019-11-30 11:42:01 4721 5

原创 【计算机图形学】Liang-Barsky裁剪算法(C++实现)

背景Cyrus-Beck算法的优化算法思想基本出发点是直线的参数方程由图可知,只要求出u的取值即可求出yp1‘,从而得到线段与边界xwl交点坐标P1’(xwl,ywb,x1,x2,y1,y2都是已知的),同理可得P2‘。推广到普遍情况,u的取值范围:由点的裁剪公式(即点P(x,y)在裁剪窗口内必须满足)推出:将公式移位:令很眼熟有没有,就是上图的那个公式。于是就有upk ...

2019-11-30 11:41:22 4192

原创 【Java】输入输出流

输入流:Java打开一个数据源到程序的流,从流中读取数据输出流:把程序写入流中都是单向通道按照;流的方向:输入,输出流流的基本数据单位:字节流(InputStream,OutputStream) 字节字符流 2个字节(Reader和Writer为基础其他直接流的类直接或间接继承自这两个类)File类java。io包文件所在目录,文件长度,文件读写权限等public FileFi...

2019-11-14 14:32:25 207

原创 【错误】Exception in thread "main" java.util.UnknownFormatConversionException: Conversion = 'l'

double类型输出是%f,输入%lf我居然把这个东西忘了为什么使用%lf 读取double型的值,而用%f 进行显示?

2019-11-13 21:16:29 9014 1

原创 【错误】 y1重定义,以前的定义是“函数”

今天敲代码发现这个错误,找半天也没发现到底是哪里重定义了,把错误列表往上拉了一下,才发现…我是个憨憨,原来这个y1在math.h里定义过了。有点神奇,居然写了个这么常用的命名方式做它的函数名。继续打开math.h - corecrt_math.h ,让我来看看到底是哪个神奇函数在作怪,然后你会发现,不仅是y1,连j0,j1,jn,y0,yn都被定义了,作用:Function: do...

2019-11-08 09:50:12 4965

原创 【错误】Visual Studio 2017 版本生成pch.h,什么是pch.h?

每次创建完vs项目都会出现这么一个文件,要是新建一个源文件没include这个pch.h,还会报错:这个东西究竟有什么用呢?

2019-11-08 09:07:37 13972 1

原创 【计算机图形学】OpenGl基础

全称是Open Graphics Library ,开放图形库,它是图形硬件的软件接口。主要功能:模型绘制及观察,RGBA颜色,光照应用,图像效果增强,位图和图像处理,纹理映射,实时动画以及交互技术...

2019-11-07 09:39:47 332

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除