首页
CALL1CE
取消

PAT-Insertion or Heap Sort

1098 Insertion or Heap Sort #include<iostream> #include<vector> #include<algorithm> using namespace std; const int maxn = 101; int n;//元素个数 vector<int> origin(maxn);//原始数组...

PAT-Build A Binary Search Tree & Root of AVL Tree & Social Clusters

A1099 Build A Binary Search Tree #include<iostream> #include<vector> #include<algorithm> #include<queue> using namespace std; struct node { int val, left, right; }; co...

GAMES101-Lecture 07 Shading 1(Illumination, Shading and Graphics Pipeline) & 作业2

Rasterization 前两点算是上一节光栅化的内容 Painter’s Algorithm 从远到近画,把深度排序(O(nlogn)),然后画出来 Z-Buffer 每个像素永远去记录这个像素所表示的几何最浅的深度 z目前设置为总为正的,意为与相机的距离 生成最终渲染图的同时,还需要另一个图像,储存像素所...

PAT-Highest Price in Supply Chain & The Largest Generation & Lowest Price in Supply Chain & Path of Equal Weight & Complete Binary Search Tree

A1090 Highest Price in Supply Chain #include<iostream> #include<vector> #include<cstdio> #include<cmath> using namespace std; //节点结构体 struct node { vector<int> ch...

PAT-Integer Factorization & Acute Stroke & Tree Traversals Again & Invert a Binary Tree & Total Sales of Supply Chain

A1103 Integer Factorization #include<iostream> #include<vector> #include<algorithm> #include<cmath> #include<cstdio> using namespace std; vector<int> fac, ans, ...

GAMES101-Lecture 06 Rasterization 2(Antialiasing and Z-Buffering)

Sample Artifacts(Errors,mistakes,inaccuracies图形学黑话) 锯齿、摩尔纹、车轮效应 信号的变化太快导致采样速度跟不上,就会产生走样 Antialias反走样 先做一个模糊/滤波,再采样(不能先采样再滤波) 需要先模糊再采样,不能反过来。那么为什么不能反过来呢,那是因为先采样会发生混...

PAT-Count PAT's & Quick Sort

A1093 Count PAT’s #include<iostream> #include<vector> #include<algorithm> using namespace std; const int maxn = 100010; const int MOD = 1000000007; int main() { string str; ...

基于Unreal5和TrueSkill的游戏匹配系统-多人在线功能技术文档

一、Creating a Multiplayer Plugin 1. Multiplayer Concepts Peer-to-peer连接 client-server模式: listen-server:玩家中一台机器做服务器 dedicated-serv...

PAT-Recover the Smallest Number & Perfect Sequence & Insert or Merge & 二分查找函数upper_bound()

A1038 Recover the Smallest Number #include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; bool comp(string& s1, string& s2) {...

PAT-Be Unique & String Subtraction & Find Coins & Mooncake & Magic Coupon & Sort with Swap(0, i)

A1041 Be Unique #include<iostream> #include<vector> #include<unordered_map> using namespace std; int main() { unordered_map<int, int> map; int N;//数字个数 cin &gt...