hihoCoder#1094】的更多相关文章

#1094 : Lost in the City 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi gets lost in the city. He does not know where he is. He does not know which direction is north. Fortunately, Little Hi has a map of the city. The map can be considered as a gri…
#1094 : Lost in the City 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi gets lost in the city. He does not know where he is. He does not know which direction is north. Fortunately, Little Hi has a map of the city. The map can be considered as a gri…
刚开始学习C语言,准备在做hiho的题目的过程中来学习,在此进行记录,如果代码中有错误或者不当的地方还请指正. 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi gets lost in the city. He does not know where he is. He does not know which direction is north. Fortunately, Little Hi has a map of the city. The…
原题地址 限时10s,所以不用考虑什么算法了,暴力吧 分别按照3x3视野的四个方向去地图上匹配,把符合的地点标记出来,最后统一按照从上到下,从左到右的顺序输出. 代码: #include <iostream> using namespace std; #define MAP_SIZE 250 ][], int r, int c) { ; i < ; i++) ; j < ; j++) if (map[r + i][c + j] != sight[i][j]) return fals…
hihocoder -1121-二分图的判定 1121 : 二分图一•二分图判定 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 大家好,我是小Hi和小Ho的小伙伴Nettle,从这个星期开始由我来完成我们的Weekly. 新年回家,又到了一年一度大龄剩男剩女的相亲时间.Nettle去姑姑家玩的时候看到了一张姑姑写的相亲情况表,上面都是姑姑介绍相亲的剩男剩女们.每行有2个名字,表示这两个人有一场相亲.由于姑姑年龄比较大了记性不是太好,加上相亲的人很多,所以姑姑一时也…
Hihocoder 太阁最新面经算法竞赛18 source: https://hihocoder.com/contest/hihointerview27/problems 题目1 : Big Plus 描述 Given an NxN 01 matrix, find the biggest plus (+) consisting of 1s in the matrix. size 1 plus size 2 plus size 3 plus size 4 plus 1 1 1 1 111 1 1…
hihoCoder太阁最新面经算法竞赛15 Link: http://hihocoder.com/contest/hihointerview24 题目1 : Boarding Passes 时间限制:10000ms 单点时限:1000ms 内存限制:256MB   描述 Long long ago you took a crazy trip around the world. You can not remember which cities did you start and finish t…
http://hihocoder.com/problemset/problem/1454 调了好长时间,谜之WA... 等我以后学好dp再来看为什么吧,先弃坑(╯‵□′)╯︵┻━┻ #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; const int pp = 998244353; const int N = 503; int…
搞了一上午+接近一下午这个题,然后被屠了个稀烂,默默仰慕一晚上学会SAM的以及半天4道SAM的hxy大爷. 题目链接:http://hihocoder.com/problemset/problem/1413 这个题非常的劲! 首先可以发现,每次只变换一个字符为#,所以每次答案一定会得到相应的包含#的答案,而这个方案是可以直接计算出来的. 假设是$S[i]=$#则会得到$i*(N-i+1)$的子串数. 所以每次的答案可以表示为$sum[root]+i*(N-i+1)-ans[i]$,其中$ans[…
问题:http://hihocoder.com/problemset/problem/1148 给定两个日期,计算这两个日期之间有多少个2月29日(包括起始日期). 思路: 1. 将问题转换成求两个日期间有几个闰年 基本公式:闰年数(endYear,startYear) = 闰年数(0, endYear) - 闰年数(0, startYear) 注意点:区间的端点值 2. 闰年的要求 不能被100整除,能被4整除 或能被400整除 3. cnt = [i / 4] 对cnt = [i / 4]取…