摘要: [线段树]Easy问题(重庆2006省选) Description 有一个n个元素的数组,每个元素初始均为0。有m条指令,要么让其中一段连续序列数字反转--0变1,1变0(操作1),要么询问某个元素的值(操作2)。 例如当n=20时,10条指令如下: 操作 回答 操作后的数组 1 1 10 N/A 阅读全文
posted @ 2017-03-28 19:44 应子帆 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 在easyx环境下编译。。。 键盘上下左右控制。 阅读全文
posted @ 2017-03-24 19:56 应子帆 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 下载戳我~ 阅读全文
posted @ 2017-03-21 16:34 应子帆 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 //2017.3.12 4 int max(int a,int b){return a >= b ? a : b;} 5 struct bignum{ 6 int data[1001],len; 7 bignum(){len = 1;memset(data,0,sizeof(data));} 8 }; 9 vo... 阅读全文
posted @ 2017-03-19 20:25 应子帆 阅读(312) 评论(0) 推荐(0) 编辑
摘要: choose表示选择的算法~ 题目戳我~ 阅读全文
posted @ 2017-03-19 20:00 应子帆 阅读(513) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 int ans[8] = {53,52,51,56,53,52,54,50},pos = 1; 6 int main() 7 { 8 int a = 10; 9 while(1){ 10 a = getch(); 11 ... 阅读全文
posted @ 2017-03-19 19:57 应子帆 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-03-19 19:55 应子帆 阅读(477) 评论(1) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 char x[10001]; 4 int a[2][10001],len[3],c[10001]; 5 int main() 6 { 7 memset(a,0,sizeof(a)); 8 memset(c,0,sizeof(c)); 9 for(int q = 0;q = len[1] ? len[0]... 阅读全文
posted @ 2017-03-19 19:51 应子帆 阅读(1150) 评论(0) 推荐(0) 编辑