Mathematicians love all sorts of odd properties of numbers. For instance, they consider to be an interesting number, since it is the first odd number for which the sum of its divisors is larger than the number itself. To help them search for interest…
Visual Studio Code (简称 VS Code)是由微软研发的一款免费.开源的跨平台文本(代码)编辑器.在我看来它是「一款完美的编辑器」. 本文是有关 VS Code 的特性介绍与配置指南,相关设置主要针对 Mac OS X 平台.在快捷键部分, ⌘ 指 Command 键,⇧ 指 Shift 键,⌃ 指 Control 键,⌥ 指 Option/Alt 键. 1. Visual Studio Code 特性简介 1.1 Git 集成 如上图所示,VS Code 默认集成了 Git…
B. Beautiful Paintings time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are n pictures delivered for the new exhibition. The i-th painting has beauty ai. We know that a visitor becomes…
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 求二维平面上n个点中,最多共线的点数. 1.比较直观的方法是,三层循环,以任意两点划线,判断第三个点是否在这条直线上. 比较暴力 2.使用map来记录每个点的最大数目. /** * Definition for a point. * class Point { * int x;…