Minimal network The following undirected network consists of seven vertices and twelve edges with a total weight of 243. The same network can be represented by the matrix below.   A B C D E F G A - 16 12 21 - - -   B 16 - - 17 20 - -   C 12 - - 28 -…
In Problem 42 we dealt with triangular problems, in Problem 44 of Project Euler we deal with pentagonal number, I can only wonder if we have to deal with septagonal numbers in Problem 46. Anyway the problem reads Pentagonal numbers are generated by t…
本题来自 Project Euler 第12题:https://projecteuler.net/problem=12 # Project Euler: Problem 12: Highly divisible triangular number # The sequence of triangle numbers is generated by adding the natural numbers. # So the 7th triangle number would be 1 + 2 + 3…
本题来自 Project Euler 第9题:https://projecteuler.net/problem=9 # Project Euler: Problem 9: Special Pythagorean triplet # A Pythagorean triplet is a set of three natural numbers, # a < b < c, for which, a**2 + b**2 = c**2 # For example, 3**2 + 4**2 = 9 +…
本题来自 Project Euler 第5题:https://projecteuler.net/problem=5 # Project Euler: Problem 5: Smallest multiple # 2520 is the smallest number that can be divided by # each of the numbers from 1 to 10 without any remainder. # What is the smallest positive num…
上一次接触 project euler 还是2011年的事情,做了前三道题,后来被第四题卡住了,前面几题的代码也没有保留下来. 今天试着暴力破解了一下,代码如下: (我大概是第 172,719 个解出这道题的人) program 4 A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.…
开始做 Project Euler 的练习题.网站上总共有565题,真是个大题库啊! # Project Euler, Problem 1: Multiples of 3 and 5 # If we list all the natural numbers below 10 # that are multiples of 3 or 5, we get 3, 5, 6 and 9. # The sum of these multiples is 23. # Find the sum of all…
题意:三个正整数a + b + c = 1000,a*a + b*b = c*c.求a*b*c. 解法:可以暴力枚举,但是也有数学方法. 首先,a,b,c中肯定有至少一个为偶数,否则和不可能为以上两个等式均不会成立.然后,不可能a,b为奇c为偶,否则a*a%4=1, b*b%4=1, 有(a*a+b*b) %4 = 2,而c*c%4 = 0.也就是说,a和b中至少有一个偶数. 这是勾股数的一个性质,a,b中至少有一个偶数. 然后,解决过程见下(来自project euler的讨论): tag:m…
POJ3436 Command Network 最小树形图裸题 傻逼poj回我青春 wa wa wa 的原因竟然是需要%.2f而不是.2lf 我还有英语作业音乐作业写不完了啊啊啊啊啊啊啊啊啊 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <cmath> #include <vector> #define fi…
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 自学Zabbix9.1 Network Discovery 网络发现原理 1. 网络发现简介 网络发现有什么用?网络发现怎么配置?网络发现功能让我们能更快速的部署zabbix.简化zabbix管理.并且在经常变动的环境里面也不需要花太多的精力,毕竟网络发现也能随时变化.但是此功能是无法发现网络拓扑的.基于网络的discovery指的是基于IP的discovery,即是给定zabbix一个IP范围…