上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页
摘要: 整数类型:(整数无限制) ——十进制:1010,99,-123 ——二进制,以0B或0b开头:0B101,-0b101 ——八进制,以0o或0O开头:0o123,-0O456 ——十六进制,以0x或0X开头:0x123,-0X78A 浮点类型:(与数学中实数的概念一致) ——带有小数点及小数的数字 阅读全文
posted @ 2018-03-31 23:52 ouyang_wsgwz 阅读(223) 评论(0) 推荐(0)
摘要: 熟练使用map即可,不然用vector会超时 阅读全文
posted @ 2018-03-31 21:22 ouyang_wsgwz 阅读(135) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 //两遍迪杰斯特拉 5 #define INF 0xfffffff 6 using namespace std; 7 const int maxn = 400 + 5; 8 int rail[maxn][maxn]; 9 int dis[maxn]; 10 int vis[maxn]; 11 12 v... 阅读全文
posted @ 2018-03-31 20:13 ouyang_wsgwz 阅读(116) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 using namespace std; 4 5 int n, m, c1, c2; 6 int dis[510], weight[510], e[510][510], num[510], w[510]; 7 bool visit[510]; 8 const int inf = 99999999; 9 10 int mai... 阅读全文
posted @ 2018-03-31 09:46 ouyang_wsgwz 阅读(112) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 const int maxn = 10005; 7 double a[maxn]; 8 int b[maxn]; 9 double c[maxn]; 10 11 int main(){ 12 ios::sync_with_stdio(fals... 阅读全文
posted @ 2018-03-31 08:40 ouyang_wsgwz 阅读(103) 评论(0) 推荐(0)
摘要: turtle(海龟)库是turtle绘图体系的Python实现 ——turtle 绘图体系:1969年诞生,主要用于程序设计入门 ——Python 语言的标准库之一 (标准库:随解释器直接安装到操作系统中的功能模块) ——入门级的图形绘制函数库 Python 计算生态 = 标准库 + 第三方库 (第 阅读全文
posted @ 2018-03-30 23:13 ouyang_wsgwz 阅读(136) 评论(0) 推荐(0)
摘要: 1 //克鲁斯卡尔 2 #include 3 #include 4 5 using namespace std; 6 const int maxn = 50000 + 5; 7 8 struct node{ 9 int x, y; 10 int len; 11 }g[maxn]; 12 13 bool cmp(node x, node y){ 14 ... 阅读全文
posted @ 2018-03-29 20:08 ouyang_wsgwz 阅读(185) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 const int maxn = 10000 + 5; 7 int a[maxn]; 8 int f[maxn][15]; 9 10 void rmq(int cnt){ 11 memset(f, 0, sizeof(f)); 12 ... 阅读全文
posted @ 2018-03-28 21:52 ouyang_wsgwz 阅读(145) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 const int maxn = 500 + 10; 7 const int INF = 0x3f3f3f3f; 8 int pic[maxn][maxn]; //用来存图 9 int dis[maxn]; 10 int val[maxn], a... 阅读全文
posted @ 2018-03-28 21:10 ouyang_wsgwz 阅读(157) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int maxn = 1000000 + 5; 7 int v[maxn]; 8 int c[maxn]; 9 int dp[maxn]; 10 11 int main(){ 12 ios::sync_with_stdio(fal... 阅读全文
posted @ 2018-03-26 21:58 ouyang_wsgwz 阅读(138) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页