浏览器标题切换
浏览器标题切换end
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 74 下一页
摘要: You are given a system of pipes. It consists of two rows, each row consists of nn pipes. The top left pipe has the coordinates (1,1)(1,1) and the bott 阅读全文
posted @ 2019-10-03 18:01 抓水母的派大星 阅读(534) 评论(0) 推荐(0) 编辑
摘要: 思路 谁面临平衡态势,必输。 x和所有a[i]异或好之后所得到的x,如果x=0的话,说明后手赢。 需要知道一个异或规则:x^y^y=x。 代码中第二个for循环的时候,(a[i]>(a[i]^x) ,前面的a[i]代表当前堆,后面的 x^a[i] 代表当前a[i]没有被取,代表除了当前堆,其他所有堆 阅读全文
posted @ 2019-09-26 17:30 抓水母的派大星 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 题意 有n堆石子,每堆石子里面至少有一个石子,有A、B两人。A先取,取完所有石子的一方获胜,问当双方都采取最优策略时,谁能获胜。 思路 Nim博弈模板,谁面临平衡态势谁就会输。 特判一种情况:当每一堆石子的个数全部都为1的时候,这个时候只能每次拿一个,根据1的奇偶性进行判断。 AC代码 #inclu 阅读全文
posted @ 2019-09-26 10:07 抓水母的派大星 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 题解 素数筛模板题,不能用单纯暴力来解。 AC代码 #include<iostream> #include<stdio.h> #include<string.h> using namespace std; const int N=5e6+10; //int book[N]; //int pri[N/ 阅读全文
posted @ 2019-09-25 22:01 抓水母的派大星 阅读(153) 评论(0) 推荐(0) 编辑
摘要: n条折线最多将平面分成几个部分:2*n*n-n+1 n条直线最多将平面分成几个部分:1+(1+n)n/2 阅读全文
posted @ 2019-09-24 08:46 抓水母的派大星 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two s 阅读全文
posted @ 2019-09-15 11:17 抓水母的派大星 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 题意 给出的所有路中存在一条路正在修建, 问要从1走到n,找出最短路径的最大长度 思路 先一遍dijkstra找到最短路径长度,并且记录路径 再逐个删掉通向最短路径的每一条边换成别的能够到达终点的路 计算其最大长度 给定时间是5s,不会超时 难点:在记录路径上 AC代码 #include<iostr 阅读全文
posted @ 2019-09-14 15:32 抓水母的派大星 阅读(225) 评论(0) 推荐(0) 编辑
摘要: ##AC代码 #include<iostream> #include<stdio.h> #include<string.h> using namespace std; #define inf 0x3f3f3f3f int book[1010],dist[1010],e[1010][1010],pre 阅读全文
posted @ 2019-09-12 19:31 抓水母的派大星 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Problem Description This is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence. Input Each sequence is descr 阅读全文
posted @ 2019-09-12 16:49 抓水母的派大星 阅读(163) 评论(0) 推荐(0) 编辑
摘要: ##WA代码 这个是按照自己的理解写的,样例过了,可是WA: #include<stdio.h> #include<cmath> #include<string.h> #include<iostream> using namespace std; int a[550][550]; int rudu[ 阅读全文
posted @ 2019-09-12 11:31 抓水母的派大星 阅读(170) 评论(0) 推荐(0) 编辑
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 74 下一页