题意:给你一个2×n的矩阵,起点在左上,终点在右下,可以移动到本格相邻的格子里,给你q个时间点,每个时间点会有一个格子的状态发生变化,格子状态分为可走和不可走,一开始所以格子都是可走的,要求输出每个时间点能不能从起点走到终点。 思路:对任意格子来说,设它的坐标为x,y,对于他的另一行的三个坐标3-x ...
分类:
其他好文 时间:
2020-01-21 23:18:44
阅读次数:
73
这题做了一个time limit exceeded public int[] sortArrayByParityII(int[] A) { LinkedList<Integer> list = new LinkedList<Integer>(); for (int i = 0; i < A.leng ...
分类:
其他好文 时间:
2020-01-21 20:18:28
阅读次数:
66
一、时钟 import turtle as t import datetime as dt #画出背景 game = t.Screen() game.bgcolor("white") game.setup(600,600) game.tracer(0) #定义画笔属性 pen = t.Turtle( ...
分类:
编程语言 时间:
2020-01-21 18:25:39
阅读次数:
101
There are nn Christmas trees on an infinite number line. The ii -th tree grows at the position xixi . All xixi are guaranteed to be distinct. Each int ...
分类:
其他好文 时间:
2020-01-21 13:20:26
阅读次数:
96
C - NEKO's Maze Game 题目链接:http://codeforces.com/contest/1293/problem/C 题意:给你一个2xn的矩阵,让你判断每步之后是否能从(1,1)走到(2,n),一开始都是可行走的,然后给出q次查询,每次查询的(x,y)首次出现该点是封闭的, ...
分类:
其他好文 时间:
2020-01-20 21:10:55
阅读次数:
128
Mathematical Skills II (MAT00027I) 2019/20Project 2 – Sparse matricesBackgroundMatrices with large dimensions can be difficult to handle on computers: ...
分类:
其他好文 时间:
2020-01-20 20:59:39
阅读次数:
72
Rank1696。 Cytus II好评。 因为下晚自习了所以D没调出来身败名裂。 A 签到题。 ...
分类:
其他好文 时间:
2020-01-20 20:44:53
阅读次数:
54
layui自定义分页 由于每次加载时都会执行jump回调,所以初次不让它执行jump里的方法 //自定义排版 laypage.render({ elem: 'demo8' , count: totalCount , layout: ['count', 'prev', 'page', 'next', ...
分类:
其他好文 时间:
2020-01-20 18:52:35
阅读次数:
71
1 #include <stdio.h> 2 #include <string.h> 3 #include <iostream> 4 #include <string> 5 #include <math.h> 6 #include <algorithm> 7 #include <vector> 8 ...
分类:
其他好文 时间:
2020-01-20 09:56:34
阅读次数:
84
有一个结论: 当 $(1,1)$ 不能抵达 $(2,n)$ 时,必定存在一个点对,这两个点的值均为真,且坐标中的 $x$ 互异,$y$ 的差 $\leq 1$ 这个结论的正确性感觉非常显然,就不多说了。 下图可以形象地解释点对的位置关系。 那对于每个点的值,只要开一个数组 记录一下即可。 有了上述结 ...
分类:
其他好文 时间:
2020-01-20 09:40:13
阅读次数:
103