• CF Round #600 (Div 2) 解题报告(A~E)

    时间:2023-11-10 11:32:46

    CF Round #600 (Div 2) 解题报告(A~E)A:Single Push采用差分的思想,让\(b-a=c\),然后观察\(c\)序列是不是一个满足要求的序列#include<bits/stdc++.h>using namespace std;const int maxn ...

  • LeetCode 349 Intersection of Two Arrays 解题报告

    时间:2023-11-09 21:26:20

    题目要求Given two arrays, write a function to compute their intersection.题目分析及思路给定两个数组,要求得到它们之中共同拥有的元素列表(列表中元素是唯一的)。可以将所给数组转成集合,利用集合的交集的概念,最后将结果转成列表即可。pyt...

  • uva 489.Hangman Judge 解题报告

    时间:2023-09-21 19:46:38

    题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=430 #include <iostream> #includ...

  • Lintcode: First Bad Version 解题报告

    时间:2023-09-06 13:40:20

    First Bad Versionhttp://lintcode.com/en/problem/first-bad-versionThe code base version is an integer and start from 1 to n. One day, someone commit a ...

  • Codeforces Round #276 (Div. 2) 解题报告

    时间:2023-08-25 16:48:14

    题目地址:http://codeforces.com/contest/485A题.Factory模拟。判断是否出现循环,如果出现,肯定不可能。代码: #include<cstdio> #include<stdbool.h> using namespace std; int m...

  • C-C Radar Installation 解题报告

    时间:2023-08-25 08:54:50

    C-C    Radar Installation   解题报告题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=86640#problem/C题目:DescriptionAssume the coasting is an infi...

  • 【leetCode百题成就】Gas Station解题报告

    时间:2023-07-31 21:08:50

    题目:There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it co...

  • poj2388解题报告(排序)

    时间:2023-07-19 16:35:26

    POJ 2388,题目链接http://poj.org/problem?id=2388题意:水题一道给定n个数,输出中间值,可以用sort,干脆快捷。代码://396K32MS#include <cstdio>#include <algorithm>int buf[10000...

  • BZOJ 4864: [BeiJing 2017 Wc]神秘物质 解题报告

    时间:2023-07-14 22:59:26

    4864: [BeiJing 2017 Wc]神秘物质Description21ZZ 年,冬。小诚退休以后, 不知为何重新燃起了对物理学的兴趣。 他从研究所借了些实验仪器,整天研究各种微观粒子。这一天, 小诚刚从研究所得到了一块奇异的陨石样本, 便迫不及待地开始观测。 在精密仪器的视野下,构成陨石的...

  • 【九度OJ】题目1203:IP地址 解题报告

    时间:2023-07-04 12:17:50

    【九度OJ】题目1203:IP地址 解题报告标签(空格分隔): 九度OJhttp://ac.jobdu.com/problem.php?pid=1203题目描述:输入一个ip地址串,判断是否合法。 输入:输入的第一行包括一个整数n(1<=n<=500),代表下面会出现的IP地址的个数。...

  • 【LeetCode】537. Complex Number Multiplication 解题报告(Python & C++)

    时间:2023-07-01 23:29:02

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/目录题目描述解题方法日期题目地址:https://leetcode.com/problems/complex-number-multiplication/description/题目描述Gi...

  • 【LeetCode】1085. Sum of Digits in the Minimum Number 解题报告(C++)

    时间:2023-06-15 11:34:26

    作者: 负雪明烛id: fuxuemingzhu个人博客:http://fuxuemingzhu.cn/目录题目描述题目大意解题方法遍历日期题目地址:https://leetcode-cn.com/problems/sum-of-digits-in-the-minimum-number/题目描述Gi...

  • LeetCode: Path Sum II 解题报告

    时间:2023-06-07 11:33:44

    Path Sum IIGiven a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tr...

  • 【LeetCode】Island Perimeter 解题报告

    时间:2023-05-11 23:59:20

    【LeetCode】Island Perimeter 解题报告[LeetCode]https://leetcode.com/problems/island-perimeter/Total Accepted: 16143Total Submissions: 28552Difficulty: EasyQ...

  • HDU 4010.Query on The Trees 解题报告

    时间:2023-04-07 09:30:38

    题意:给出一颗树,有4种操作:1、如果x和y不在同一棵树上则在xy连边2、如果x和y在同一棵树上并且x!=y则把x换为树根并把y和y的父亲分离3、如果x和y在同一棵树上则x到y的路径上所有的点权值+w4、如果x和y在同一棵树上则输出x到y路径上的最大值动态树入门题:#include <iost...

  • 习题: codevs 2492 上帝造题的七分钟2 解题报告

    时间:2023-04-04 18:14:20

    这道题是受到大犇MagHSK的启发我才得以想出来的,蒟蒻觉得自己的代码跟MagHSK大犇的代码完全比不上,所以这里蒟蒻就套用了MagHSK大犇的代码(大家可以关注下我的博客,友情链接就是大犇MagHSK的博客,大神是山东省队队员,他的博客中的题的质量都比我高几个档次);这是大神MagHSK的解释:因...

  • NOIP201605玩具谜题-解题报告

    时间:2023-03-15 20:44:32

    NOIP201605玩具谜题-解题报告                                                                        2019-11-07       14:14         Part 1原题:小南有一套可爱的玩具小人,它们各有不同...

  • Problem A: 选举 解题报告

    时间:2023-02-26 22:06:39

    Problem A: 选举题意给出一个投票过程。有\(n\)个选民和\(m\)个候选人,每个选民\(i\)有个不重且有序的可投集合\(\{a_i\}\)。对于第一轮投票,选民\(i\)会投给\(a_{i,1}\);之后的每一轮,Ta会投给自己集合中上一轮得票最多的人,如果有多个最多,投给位置靠前的。...

  • 习题2-5 分数化小数 解题报告

    时间:2023-02-26 21:30:23

    题目: 代码:#include <stdio.h>#include <stdlib.h>int main(){int a,b,c,i,j,k=0;while(scanf("%d%d%d",&a,&b,&c) !=EOF ) {if(a==0&am...

  • 【LeetCode】120. Triangle 解题报告(Python)

    时间:2023-02-25 23:25:02

    【LeetCode】120. Triangle 解题报告(Python)作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/题目地址https://leetcode.com/problems/triangle/description/题目描述...