自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 PAT-1087

遍历的同时记录路径。想着先试试不处理字符串到整型的映射,直接拿字符串当做索引会不会超时,结果稳得一笔。#include #include #include #include #include #include #include #include #define DEBUG //IMPORTANTusing namespace std;/*--------Glob

2018-03-03 13:06:42 208

原创 Shader-水面波纹效果

最近要用到一个水面的波纹效果,又不想用现成的资源,就像自己写一个。要求解一个真实的水面的波纹,首先需要知道当前水面的状态,还要知道当前所施加的扰动。一开始的想法肯定是用一个二维数组来储存整个水面的高度和速度,再根据外加扰动计算下一帧的状态,生成高度贴图后扔给shader。然而,这样的实现虽然是最真实的,可是应该没有电脑能做到一秒60帧。。。所以肯定得做一些简化。毕竟我们要的只是一个比较真实的效

2018-01-17 11:35:05 1922

原创 固定管线Shader笔记

Shader "Custom/VertexLit" { Properties { _Color ("Main Color", Color) = (1,1,1,0.5) _Shininess ("Shininess", Range (0.01, 1)) = 0.7 _SpecColor ("Spec Color", Color) = (1,1,1,1) _Emission ("Em

2018-01-14 23:01:32 165

原创 深入理解计算机系统(第三版) 第二章答案(仅供参考!)

肯定有很多问题,大家对答案的时候发现一旦问题请直接给我留言。{CSDN:CODE:2602831}

2017-11-24 17:40:26 4955

原创 Unity Line Collider

最近在写unity的一个2D游戏,因为unity中只有Line Render却没有Line Collider,所以自己写了个。请配合Line Render使用!{CSDN:CODE:2602366}

2017-11-17 23:50:19 368

原创 PAT 1038

#include #include #include using namespace std;int N;struct num { int sum=0; num* next[10] = { nullptr,nullptr,nullptr,nullptr,nullptr,nullptr,nullptr,nullptr,nullptr,nullptr }; int en

2017-11-05 21:21:53 157

原创 PAT 1034

#include #include #include #define inf 9999using namespace std;int N, K;map gang,res;map weight;map gangs;set ans;string findHead(string id){ if (gang[id] == "") gang[id] = id

2017-11-04 10:30:57 143

原创 1033. To Fill or Not to Fill (25)

#include #include #include #include #define inf 9999using namespace std;struct binary{ double price, oil; binary(double p, double o) :price(p), oil(o) {}; bool operator<(const bina

2017-11-03 17:00:23 100

原创 PAT 1026

#include #include #include using namespace std;struct customer{ int arrive, spend, served, vip; customer() {}; customer(int h, int m, int s, int spend, int vip) :arrive((h - 8) * 3600

2017-10-29 00:30:27 160

原创 PAT 1025

#include #include #include using namespace std;int N, K, score;string id;struct stup // 因为set不能直接对指针对象排序,所以套了个壳 { struct student { string id; int score, location_

2017-10-28 16:09:35 223

原创 PAT 1024

#include #include using namespace std;string add(string a, string b) { string res = a; int temp = 0; for (int i = 0; i < b.size(); i++) { res[a.size()-1-i] = (a[a.size() - 1 - i] + b[b.

2017-10-28 11:55:47 148

原创 PAT 1023

#include #include using namespace std;map dig[2];int main(){ string input; cin >> input; for (int i = 0; input[i]; i++) dig[0][input[i] - '0'] ++; string output=input; int temp = 0

2017-10-27 19:13:14 170

原创 PAT 1022

#include #include #include using namespace std;map> lib[6];int main(){ int N,id; string temp; cin >> N; for (int i = 0; i < N; i++) { cin >> id; getchar(); getline(cin,

2017-10-27 18:44:11 155

原创 PAT 1021

#include #include using namespace std;#define inf 999999999int N;struct node{ vector e;};node* nodes[10010];int e_n[10010];int res[10010];bool visit[10010];int fami

2017-10-27 14:50:39 125

原创 PAT 1020

#include #include using namespace std;int N;vector input[2];vector ans[31];void build(int deep, int l1, int r1, int l2, int r2){ if (l1 > r1 || l2 > r2) return; ans[deep].push_

2017-10-27 13:38:38 136

空空如也

空空如也

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

TA关注的人

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