版权声明:本文为博主原创文章,转载时请标明出处。 https://blog.csdn.net/FarmerJohnOfZS/article/details/51427773
Ⅰ各种模板
1. 对拍
在程序的目录下建立.txt文件,输入:
@echo off
:loop
data.exe//生成数据
right.exe//要对拍的
brute_force.exe//暴力
fc data1.out data2.out//两个程序的输出文件
if not errorlevel 1 goto loop
pause
goto loop
把文件扩展名名改成.bat
Ⅱ敲Blog专用
1. CSDN(神奇)数学符号
2. markdown模板
3.Markdown颜色♂
顺便膜一膜!
4. 代码片这么用{失效}
<textarea name="code" class="c++">
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define oo 2139062143
#define sqr(x) ((x)*(x))
#define lowbit(x) ((x)&(-x))
#define abs(x) (((x)>=0)?(x):(-(x)))
#define max(x,y) (((x)>(y))?(x):(y))
#define min(x,y) (((x)<(y))?(x):(y))
#define fo(i,x,y) for (int i = (x);i <= (y);++ i)
#define fd(i,x,y) for (int i = (x);i >= (y);-- i)
using namespace std;
typedef double db;
typedef long long ll;
int n;
int main()
{
scanf("%d", &n);
}
</textarea>
ⅢTips
1. 不(luan)用神奇位运算
常见的有:
1. & 替 % [
2. << 替 * [
3. 异或
详见Matrix67大神的位运算讲解系列文章(目录)
4.
Ⅳ For蒟蒻
1. 变量类型表
名称 | 标识符 | 数值范围 | 存储空间(byte) |
---|---|---|---|
短整型 | shortint | -2^7..2^7-1 | 1 |
整型 | integer | -2^15..2^15-1 | 2 |
长整型 | longint | -2^31..2^31-1 | 4 |
64位整数 | int64 | -2^63..2^63-1 | 8 |
qword | qword | 0..2^64 | 8 |
字节型 | byte | 0..2^8-1 | 1 |
双字节型 | word | 0..2^16-1 | 2 |
单精度型 | single | 1.5e-45..3.4e38 | 4 |
基本实型 | real | 2.9e-39..1.7e38 | 8 |
双精度型 | double | 5.0e-324..1.7e308 | 8 |
扩展型 | extended | 3.4e-4932..1.1e4932 | 10 |
装配型 | comp | -2^63+1..2^63-1 | 8 |
字符型 | char | Ascii 0..255 | 1 |
布尔型 | boolean | TRUE、FALSE | 1 |
2. fillchar/memset附表
fillchar(array,sizeof(array),num) / memset(array,num,sizeof(array))
P.s.整型有效
Num | a[0] |
---|---|
0 | 0 |
127 | 2139062143 |
128 | -2139062144 |
255 | -1 |
Ⅴ ForGame
uses crt;
function MessageBox(hWnd:LONGINT;lpText:PCHAR;lpCaption:PCHAR;uType:DWORD):LONGINT;
stdcall; external ‘user32.dll’ name ‘MessageBoxA’;
定义过程 MessageBox(0,内容,标题,64);
uses dos;
exec(‘程序路径’);
运行某程序
Ⅵ 常识?
- 程序员分级
CodeMonkey 程序猿
Coder 编码员
Programmer 程序员
SoftwareEngineer 软件工程师
SoftwareAnalyst 软件分析师
SoftwareArchitect 软件架构师