Educational Codeforces Round 83 (Rated for Div. 2) = A. Two Regular Polygons 题意 给出一个正$n$边形,问能否使用这$n$个点重新构成正$m$边形 题解 正多边形转正多边形,直接判断点能不能均分就好了 代码 B. Bogo ...
分类:
其他好文 时间:
2020-03-10 21:26:10
阅读次数:
49
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 ...
分类:
其他好文 时间:
2020-03-10 19:55:11
阅读次数:
54
[toc] 涵盖知识点:思维、dp。 比赛链接: "传送门" "A Two Regular Polygons" 题意: 问你正n边形里能不能套正m边形。 题解: 判断n是不是m倍数即可。 Accept Code: "B Bogosort" 题意: 重排数组使得不存在一对数满足两者值之差等于下标之差。 ...
分类:
其他好文 时间:
2020-03-10 14:11:34
阅读次数:
118
题目文件下载 比赛链接 ps: 这是我第一次打CF = = div2的7题只做对了3题,还是太弱了,以后要变强! 另外,我的证明有些比较多余,不想看可以跳过~~ 欢迎指出错误~ A. Two Regular Polygons 大意: 给定两个数n,m,问是否可以找到一组正n边型和正m边型,使得正m边 ...
分类:
其他好文 时间:
2020-03-10 11:44:13
阅读次数:
87
Problem Description Give you a number on base ten,you should output it on base two.(0 < n < 1000) Input For each case there is a postive number n on b ...
分类:
其他好文 时间:
2020-03-09 20:52:34
阅读次数:
49
You are given two integers nn and dd . You need to construct a rooted binary tree consisting of nn vertices with a root at the vertex 11 and the sum o ...
分类:
其他好文 时间:
2020-03-09 10:32:58
阅读次数:
52
What are Peng (Bob) Chi's top 3 strengths? Can you give an example of how one or two of those strengths has impacted you or the business? What are the ...
分类:
其他好文 时间:
2020-03-09 01:41:29
阅读次数:
66
public class Class112 { public boolean findPath(char[] matrix, int rows, int cols, char[] str){ boolean anchor[] = new boolean[matrix.length]; for(int ...
分类:
编程语言 时间:
2020-03-08 19:59:34
阅读次数:
71
import csv import uuid from hashlib import sha256 import numpy as np import argparse import random,string def gen_demo(rows:int, each_iter:int, featur ...
分类:
其他好文 时间:
2020-03-08 17:21:33
阅读次数:
88
原题链接在这里:https://leetcode.com/problems/product-of-the-last-k-numbers/ 题目: Implement the class ProductOfNumbers that supports two methods: 1. add(int nu ...
分类:
其他好文 时间:
2020-03-08 15:45:52
阅读次数:
64