码迷,mamicode.com
首页 >  
搜索关键字:uva easy problem fr    ( 50694个结果
CF633H Fibonacci-ish II
VIII.CF633H Fibonacci-ish II 强烈谴责卡常屑题( 莫队。于是要支持插入数、查询与斐波那契数列的点积和。 离散化后就直接在线段树上处理。于是变成单点插入/删除(这个很 easy)以及后缀斐波那契数列前移/后移。 直接上矩阵维护。但是会TLE(因为常数是 \(2^3\))。预 ...
分类:其他好文   时间:2021-04-07 11:15:58    阅读次数:0
UVA - 11280 Flying to Fredericton (伪最短路)
题意:求无向图从起点到终点最多停留k次的最短路 设d[i][j]表示走了i步后到达点j的最小代价,看似最短路,实则dp,因为求解过程中i是递增的,不存在环,直接递推求解即可 什么?你说最短路也属于dp?那没事了 1 #include<bits/stdc++.h> 2 using namespace ...
分类:其他好文   时间:2021-04-07 10:31:17    阅读次数:0
Leetcode 59. 螺旋矩阵 II
地址 https://leetcode-cn.com/problems/spiral-matrix-ii/ 给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix 。 示例 1: 输入:n = 3 输出:[[1,2,3],[8, ...
分类:其他好文   时间:2021-04-06 14:49:59    阅读次数:0
Codeforces Round #712 (Div. 2) C
题目链接 https://codeforces.ml/contest/1504/problem/C 题目截图 题目大致描述 给定一个01串,判断是否能构造出两个平衡的括号序列ans1和ans2,若能给定其中一种解,构造需满足以下规则: 对于01串中元素为0的位置i,ans1[i] != ans2[i ...
分类:其他好文   时间:2021-04-06 14:45:19    阅读次数:0
UVA - 1416 Warfare And Logistics (区间分治+Floyed)
题意:求无向图去掉每一条边后的两两最短路之和 非标解 之前见过去掉每个点的两两最短路的问题,用的区间分治+Floyed,我想着边的也可以试一试,结果就过了。。。 设g(l,r)表示除了[l,r]区间内的边都加上了的情况下的两两最短路矩阵,那么有递推式$\left\{\begin{matrix}\be ...
分类:其他好文   时间:2021-04-06 14:09:28    阅读次数:0
AtCoder Beginner Contest 049 B - Thin
Problem Statement There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either . or *. The charact ...
分类:其他好文   时间:2021-04-05 12:52:04    阅读次数:0
4D - Mysterious Present 二维最长上升子序列
原题链接https://codeforces.com/problemset/problem/4/D 题意:给你n个二元组和起始条件,求其最大二维上升子序列,并输出选择编号。 思路:按照一个维度排序,然后DP即可,注意细节。 代码如下 int n, w, h; struct node{ int w, ...
分类:其他好文   时间:2021-04-05 12:33:56    阅读次数:0
hdu3639Hawk-and-Chicken(无向图缩点+dfs)
题目描述: Kids in kindergarten enjoy playing a game called Hawk-and-Chicken. But there always exists a big problem: every kid in this game want to play th ...
分类:其他好文   时间:2021-04-05 12:24:28    阅读次数:0
百亿数据,毫秒级返回,如何设计?--浅谈实时索引构建之道
本文已整理致我的 github 地址 https://github.com/allentofight/easy-cs,欢迎大家 star 支持一下 前言 近年来公司业务迅猛发展,数据量爆炸式增长,随之而来的的是海量数据查询等带来的挑战,我们需要数据量在十亿,甚至百亿级别的规模时依然能以秒级甚至毫秒级 ...
分类:其他好文   时间:2021-04-05 12:21:59    阅读次数:0
Leetcode 524. Longest Word in Dictionary through Deleting
Description: Given a string s and a string array dictionary, return the longest string in the dictionary that can be formed by deleting some of the gi ...
分类:其他好文   时间:2021-04-05 12:21:20    阅读次数:0
50694条   上一页 1 ... 12 13 14 15 16 ... 5070 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!