上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: https://vjudge.net/contest/360957#problem/J #include <bits/stdc++.h> using namespace std; typedef long long ll; struct Matrix{ int m[2][2]; }; Matrix 阅读全文
posted @ 2020-03-10 23:58 SunCY 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 二叉树的遍历,这个题不能用T[4*N]建树,因为最坏的情况树很深,数组会爆的,2^1000 s所以求后续遍历的话,就反着来 根节点—>右子树—>左子树,然后把结果用stack存起来倒叙输出就好了 // preorder sequence inorder sequence postorder sequ 阅读全文
posted @ 2020-03-10 21:42 SunCY 阅读(123) 评论(0) 推荐(0) 编辑
摘要: FBI树,直接套上线段树的模板 #include<bits/stdc++.h> #define endl '\n' #define _for(i,a,b) for(int i=a;i<b;i++) using namespace std; const int N = 1055; typedef lo 阅读全文
posted @ 2020-03-10 20:42 SunCY 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 先达标找规律吧,达标的时候看奇数的个数而不是偶数的个数,就能和看出来了 这个题我算pow(2,n)的时候又出现了向下取整的情况,所以就是说,以后算2的n次方 直接1ll<<n就完了。 https://codeforces.com/gym/101972/problem/J #include<bits/ 阅读全文
posted @ 2020-03-10 15:56 SunCY 阅读(124) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/gym/101972/problem/G 求二维的一片区域中的最大最小值。 #include<bits/stdc++.h> #define endl '\n' #define _for(i,a,b) for(int i=a;i<b;i++) using 阅读全文
posted @ 2020-03-10 15:18 SunCY 阅读(177) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/gym/101972/problem/C https://blog.csdn.net/a1dark/article/details/10679833 #include<bits/stdc++.h> #define endl '\n' #define _f 阅读全文
posted @ 2020-03-10 14:40 SunCY 阅读(182) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<vector> #include<algorithm> #include <queue> #include <functional> #define endl '\n' #define _for(i,a,b) for(int i=a;i<b;i 阅读全文
posted @ 2020-03-10 13:18 SunCY 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 输入方式 a, b, c = map(float, input().split()) alist = list(map(int, input().split())) n = int(input()) #数组 for i in range(n): Y[i] = int( input() ) impor 阅读全文
posted @ 2020-03-09 23:57 SunCY 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 一,几个问题 1.什么是面向过程的程序设计的特点? 面向过程(Procedure Oriented)是一种以过程为中心的编程思想,面向过程也可称之为面向记录编程思想,他们不支持丰富的面向对象特性(比如继承、多态),并且它们不允许混合持久化状态和域逻辑。就是分析出解决问题所需要的步骤,然后用函数把这些 阅读全文
posted @ 2020-03-09 21:59 SunCY 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 工具-》编译器选项-》代码-》缺省源-》把 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <string> #include <map> 阅读全文
posted @ 2020-03-07 10:35 SunCY 阅读(1077) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页