- 博客(10)
- 收藏
- 关注
原创 Unity---pivot和center的区别
pivot:物体的局部坐标原点在世界坐标中的位置,可以通过transform.position访问到; center:引擎根据物体的形状大小计算出的几何中心点; pivot由模型制作人员制作时确定; center的具体位置也与子物体选中的物体有关,所以是变化的; ————————————————————————————————————————————————————————— 第一...
2018-10-19 09:27:16
1623
原创 C++ STL string 用法详解
一、string的初始化 首先,为了在程序中使用string类型,必须包含头文件 <string>。如下: #include <string> 注意这里不是string.h,string.h是C字符串头文件。 string类是一个模板类,位于名字空间std中,通常为方便使用还需要增加: using namespace std; 声明一个字符串变量...
2018-10-04 15:12:09
4817
原创 难题--杭电1251 解题报告
统计难题 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others) Total Submission(s): 58046 Accepted Submission(s): 20262 Problem ...
2018-09-28 10:10:21
273
原创 C++ 检测对象类型
话不多说给出函数,读者可自行测试 函数 typeid(type); 包含在头文件 #include <typeinfo> 简单测例: #include <iostream> #include <typeinfo> using namespace std; int main() { cout<<typeid(int).name()<...
2018-09-27 22:12:31
5250
原创 C++ 时间函数概述
太多的不做介绍了。。毕竟博主学识有限。。( ̄▽ ̄)~* 关键要会运用常见类型; 本文只初略概述 1. unsigned long int time(& time_t); #include <iostream> #include <ctime> #include <windows.h> using namespace std; const int...
2018-09-27 22:03:36
1530
原创 解题报告:牛客练习赛27--水图
链接:https://www.nowcoder.com/acm/contest/188/C 来源:牛客网 小w不会离散数学,所以她van的图论游戏是送分的 小w有一张n个点n-1条边的无向联通图,每个点编号为1~n,每条边都有一个长度 小w现在在点x上 她想知道从点x出发经过每个点至少一次,最少需要走多少路 输入描述: 第一行两个整数 n,x,代表点数,和小w所处的位置 第二到第n行...
2018-09-22 21:28:26
763
原创 C++ 标准输入流的定点输出
喜欢用C++做输入输出的同学一定对精度的控制感到头痛 这里我做个总结: #include <iostream> #include <iomanip> using namespace std; int main() { cout<<setprecision(10)<<fixed<<1.414<<endl; ...
2018-09-20 17:36:07
1450
原创 解题报告:牛客小白月赛7--CLS分苹果
链接:https://www.nowcoder.com/acm/contest/190/G 来源:牛客网 CSL分苹果 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 CSL手上有n个苹果,第i个苹果的质量是wi,现在他想把这些苹果分给他的好朋友wavator和tokitsukaz...
2018-09-16 14:14:02
358
原创 烟花--牛客练习赛26
此题链接 上代码: #include <iostream> #include <algorithm> #include <cstdio> using namespace std; int main() { int n,k,o=0; cin>>n>>k; double p[100001],f[2][10000...
2018-09-08 17:37:34
206
原创 单独的数字 --计蒜客
此题连接 话不多说上代码: #include <iostream> #include <map> #include <iterator> using namespace std; int main() { int n; map<int,int> m; map<int,int>::iterator it; ...
2018-09-08 10:09:26
185
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅