- 博客(20)
- 收藏
- 关注
原创 UnrealEngine4 蓝图与C++函数相互调用
C++公开给蓝图 UFUNCTION(BlueprintCallable, Category = "MyCppFunc") void MyFunc(); C++调用蓝图(在头文件声明,蓝图内实现即可,无需在cpp文件实现) UFUNCTION(BlueprintImplementableEvent, Category = "MyBPFunc") void BPFunc(); ...
2020-02-09 00:13:40
741
原创 FLAGS寄存器 标志寄存器 英文全称 方便记忆
寄存器简称 全称 =1 =0 详解 CF Carry Flag(进位标志) 进位 无进位 用于反映运算是否产生进位或借位。如果运算结果的最高位产生一个进位或借位,则CF置1,否则置0。运算结果的最高位包括字操作的第15位和字节操作的第7位。移位指令也会将操作数的最高位或最低位移入CF。 PF Parity Flag(奇偶标志) 偶 奇 用于反映运算结果低8位中“1”的个数。“1...
2019-12-28 15:11:28
2050
原创 HDU - 2021 发工资咯
#include"stdio.h" int good(int a[],int n,int count) { int i,j, k ,u; int b[6]={100,50,10,5,2,1,}; /*面值*/ count=0; for(i=0;i<n;i++){ for(j=0;j<6;j++){ k=a[i]/b[j]; count+=k; u=a[i]%b[j...
2019-04-12 10:27:28
226
原创 UVA - 201 Squares
UVA - 201 Squares (1)把每相邻两点之间插入一个坐标表示边做一个2*n-1的map (2)点之间的边用‘1’表示连接 #include"stdio.h" #include"iostream" #include"algorithm" #include"string.h" using namespace std; char map[18][18]; int n, m; bo...
2018-07-28 14:17:08
295
原创 UVA - 1589 Xiangqi
UVA - 1589 Xiangqi #include"iostream" #include"algorithm" using namespace std; char map[10][11]; struct red { char name; int x, y; }r[8]; int n; int num(int a,int b,char c,int dim)//计算两个同行或...
2018-07-27 22:14:25
242
原创 UVA - 133 The Dole Queue
UVA - 133 The Dole Queu #include&amp;quot;stdio.h&amp;quot; #include&amp;quot;iostream&amp;quot; #include&amp;quot;algorithm&amp;quot; #include&amp;quot;string.h&amp;quot; #include&
2018-07-27 13:49:50
182
原创 UVA - 10340 All in All
UVA - 10340 All in All #include&quot;stdio.h&quot; #include&quot;iostream&quot; #include&quot;string.h&quot; #include&quot;string&quot; using namespace std; int main() { string t, s;
2018-07-26 13:30:05
208
原创 UVA - 202 Repeating Decimals
UVA - 202 Repeating Decimals(https://vjudge.net/problem/UVA-202) #include&quot;cstdio&quot; #include&quot;string.h&quot; int th[3005]; int ans[3005]; int main() { int a, b; while (scanf(&quot;%d%d&qu
2018-07-25 22:46:43
234
原创 UVA - 1368 DNA Consensus String
UVA - 1368 DNA Consensus String #include&quot;cstdio&quot; #include&quot;string.h&quot; int m, n; int sum; char map[50][1000]; int cnt[4][1000]; char alp[] = { 'A','C','G','T' }; int main() { int t; scanf(&qu
2018-07-25 18:04:38
226
原创 UVA - 232 Crossword Answers
UVA232 Crossword Answers #include&quot;stdio.h&quot; #include&quot;string.h&quot; char map[10][10]; int flag[10][10]; int h, w; int times; void input() { getchar(); for (int i = 0; i &amp;lt; h; ++i) {
2018-07-25 16:07:37
220
原创 UVA - 1586 Molar mass
UVA 1586 #include&quot;stdio.h&quot; #include&quot;ctype.h&quot; #include&quot;string.h&quot; double sum; int len; char s[85]; void su(char c,int d) { if (c == 'C')sum += 12.01*d; if (c == 'H')sum
2018-07-24 16:28:22
167
原创 POJ - 2251 Dungeon Master
BFS #include&quot;stdio.h&quot; #include&quot;queue&quot; using namespace std; int i, j, k; char map[31][31][31]; int dir[6][3]= { {1,0,0},{0,1,0},{0,0,1}, {-1,0,0},{0,-1,0},{0,0,-1} }; int si, sj, sk; int L, R,...
2018-07-22 10:55:26
194
原创 HDU - 3506 Monkey Party
HDU 3506 #include&quot;stdio.h&quot; #include&quot;string&quot; #include&quot;algorithm&quot; using namespace std; #define INF 99999999 int dp[2001][2001]; int s[2001][2001]; int mk[2001]; unsigned long long
2018-07-16 21:56:34
625
原创 HDU - 1312 Red and Black
#include&quot;stdio.h&quot; #include&quot;queue&quot; #include&quot;stdlib.h&quot; using namespace std; int dir[4][2] = { 0,1,0,-1,-1,0,1,0 }; char map[20][20]; int W, H,num; struct node { int x, y; }; #defi
2018-07-15 22:08:45
291
原创 取二进制数中特定第几的位置
给定一个数a,如果想取这个数的第b位,怎么做? 假如要取第3位,一个很简单的方法。 1.首先把1往左移3位:(1的二进制是1) int c=1&amp;lt;&amp;lt;3;//此时c的二进制为1000,是1左移三位的结果,c=8 2.然后把c和a作与运算,所得结果就能告诉你答案(假设a=10,那么a的二进制就是1010) int d=a&amp;amp;c;//1010&amp;amp;1000=1000,那...
2018-07-15 14:23:18
7316
1
原创 HDU - 1262 寻找素数对
把输入的数n除以2然后用i从n/2到1遍历,满足条件i和n-i是素数就好,提前打个表 #include&amp;quot;bits/stdc++.h&amp;quot; using namespace std; int i,j; char isp[10005]; void prime() { memset(isp,'Y',sizeof(isp)); isp[0]=isp[1]='N'; for(i=2;i&amp;amp;...
2018-05-20 08:17:37
807
转载 无穷大的安全初始化
如果问题中各数据的范围明确,那么无穷大的设定不是问题,在不明确的情况下,很多程序员都取0x7fffffff作为无穷大,因为这是32-bit int的最大值。如果这个无穷大只用于一般的比较(比如求最小值时min变量的初值),那么0x7fffffff确实是一个完美的选择,但是在更多的情况下,0x7fffffff并不是一个好的选择。 很多时候我们并不只是单纯拿无穷大来作比较,而是会运算后再做比较,例如...
2018-04-15 10:51:16
363
原创 HDU - 1004 Let the Balloon Rise
//注意,这样写出来的代码,flag数组里面的数量要比实际字符串数量少一,但对此答案无影响,需要的时候加一个一即可 #include&quot;iostream&quot; #include&quot;stdio.h&quot; #include&quot;string.h&quot; using namespace std; int max(int flag[1050],int N) { int i;
2018-03-20 11:04:33
197
原创 HDU - 1002 A + B Problem II
#include&quot;iostream&quot; #include&quot;stdio.h&quot; #include&quot;string.h&quot; using namespace std; int max(int a,int b); void result_and_print(int c[1050],int d[1050], int max_ab, int T); void sums(ch
2018-03-19 16:57:30
185
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅