Problem Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ...
分类:
其他好文 时间:
2020-01-22 14:39:56
阅读次数:
72
题意:给你一个2×n的矩阵,起点在左上,终点在右下,可以移动到本格相邻的格子里,给你q个时间点,每个时间点会有一个格子的状态发生变化,格子状态分为可走和不可走,一开始所以格子都是可走的,要求输出每个时间点能不能从起点走到终点。 思路:对任意格子来说,设它的坐标为x,y,对于他的另一行的三个坐标3-x ...
分类:
其他好文 时间:
2020-01-21 23:18:44
阅读次数:
73
一、时钟 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
A - Cow Contest N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better th ...
分类:
其他好文 时间:
2020-01-21 00:23:35
阅读次数:
73
[Luogu2870] [USACO07DEC]最佳牛线Best Cow Line(贪心+后缀数组) 题面 FJ打算带他的$N(1 \leq N \leq 30,000)$头奶牛去参加一年一度的“全美农场主大奖赛”。在这场比赛中,每个参赛者都必须让他的奶牛排成一列,然后领她们从裁判席前依次走过。 今 ...
分类:
编程语言 时间:
2020-01-20 22:49:16
阅读次数:
88
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
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
原题题面:https://codeforces.com/contest/1293/problem/C 题目大意: 有一个2*n的图 NEKO#ΦωΦ要带领mimi们从(1,1)的点走到(2,n)的点 每次会操作一个点,从可以通过到不可以通过,不可以通过到可以通过 每操作一次要回答一次NEKO#ΦωΦ ...
分类:
其他好文 时间:
2020-01-20 09:33:36
阅读次数:
53
题目链接:http://codeforces.com/contest/1293/problem/C 题意:给定n,q,即给定一个2*n的格子,有q个查询。 每个查询给定一个ri和ci,ri为1或2,ci在1到n之间,即给定一个(ri,ci),该点自该查询起状态进行转变(可经过/不可经过)。 如某个查 ...
分类:
其他好文 时间:
2020-01-20 09:28:01
阅读次数:
58