-
一键驱逐int ( 相关传送门
#define int ll
typedef long long ll;
int x,y,z;
signed main(){...}//然后就跟mian无关了(
//但是空格不敢乱用所以不敢直接写#define int long long而是换成两行
-
结构体初始化(不打游戏真不知道 ( 参考资料
就是例如
struct Enemy //怪的结构体,并初始化各种怪
{
char name[20];
char wupin[12];
int attack;
int defense;
int health;
int money;
long int exp;
int wupin_sign;
int wupinpro;
int double_attack;
int miss;
} strongman= {"森林巨人","黄金圣衣",40,50,350,200,100,1,2,1,0},
witch= {"森林女巫","银甲",25,15,100,50,50,2,2,1,1},
xiyi= {"森林蜥蜴","铁甲",18,10,50,30,35,3,3,2,2},
big_strongman= {"森林巨人王","巨人之臂",40*5,50*5,350*5,200*5,100*5,4,4,2,0},
lion= {"草原雄狮","绝世好剑",60,30,280,200,100,5,2,1,0},
horse= {"草原野马","碧血剑",28,12,90,50,50,6,2,1,1},
bee= {"草原黄蜂","长剑",17,11,60,30,35,7,3,2,2},
shitu= {"使徒","\0",60*8,30*8,280*8,200*8,100*8,9,1,1,0},
guai= {"\0","\0",0,0,0,0,0,0,0,0,0};
-
神奇的…重载函数? ( 参考资料
void add_edge(int u,int v,int c=0)
{
edge[++cnt]=(Edge){v,head[u],c};
head[u]=cnt;
}
for(int j=1;j<=k;++j)
{
add_edge(u+(j-1)*n,v+j*n);
add_edge(v+(j-1)*n,u+j*n);
add_edge(u+j*n,v+j*n,c);
add_edge(v+j*n,u+j*n,c);
}
//所以说没有c就自动为0
//那如果有多个这种东西会混乱吗?(挠头 或者要加逗号?
-
神奇的工具 ( 参考资料(同上 //另外这篇参考资料一维的飞行路线是真的强%%%
< (使用 @EternalAlexander 这位dalao的OI Painter绘制)
-
来自dijkstra ( 相关传送门
-
pair用法
-
结构体重载运算符
-
\((node){dis[y],[y]}\) 懒人结构体(
-
-
所以说Markdown同时使用分条和标题时要先打* 再打# QwQ
原文地址:https://www.cnblogs.com/Y15BeTa/p/10987213.html
时间: 2024-10-09 17:30:58