随笔分类 - 搜索
摘要:D. Fun with Integers You are given a positive integer nn greater or equal to 22. For every pair of integers aa and bb (2≤|a|,|b|≤n2≤|a|,|b|≤n), you ca
阅读全文
摘要:C. King's Path The black king is standing on a chess field consisting of 109 rows and 109 columns. We will consider the rows of the field numbered wit
阅读全文
摘要:一个题目是拓扑排序,这个昨天写了,然后就是这个bfs C. Ice Cave You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on for
阅读全文
摘要:C. Queen time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Queen time limit per test 1 s
阅读全文
摘要:F. Graph Without Long Directed Paths time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output F.
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/317/C?&headNav=acm来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,
阅读全文
摘要:C. Connect time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Connect time limit per test
阅读全文
摘要:问题描述 在一条街上有n个卖菜的商店,按1至n的顺序排成一排,这些商店都卖一种蔬菜。 第一天,每个商店都自己定了一个正整数的价格。店主们希望自己的菜价和其他商店的一致,第二天,每一家商店都会根据他自己和相邻商店的价格调整自己的价格。具体的,每家商店都会将第二天的菜价设置为自己和相邻商店第一天菜价的平
阅读全文
摘要:题目 题目大意:这个题目就是大小不超过9*9的迷宫,给你起点终点和起点的方向,让你进行移动移动特别之处是不一定上下左右都可以,只有根据方向确定可以走的方向。思路:需要写一个读入函数,这个需要读入起点,终点,方向(简单),还有就是接下来几行的不同位置可以转的方向,可以写几个函数,根据函数来判断方向,最
阅读全文
摘要:The Robot Moving Institute is using a robot in their local store to transport different items. Of course the robot should spend only the minimum time
阅读全文
摘要:What are you doing at the end of the world? Are you busy? Will you save us? What are you doing at the end of the world? Are you busy? Will you save us
阅读全文
摘要:Some company is going to hold a fair in Byteland. There are nn towns in Byteland and mm two-way roads between towns. Of course, you can reach any town
阅读全文
摘要:A tournament is a directed graph without self-loops in which every pair of vertexes is connected by exactly one directed edge. That is, for any two ve
阅读全文
摘要:There is a rectangular grid of size n×mn×m . Each cell has a number written on it; the number on the cell (i,ji,j ) is ai,jai,j . Your task is to calc
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std; char s[10][10]; int panduan(int row,int cew) { for
阅读全文
摘要:Absent-minded Masha got set of n cubes for her birthday. At each of 6 faces of each cube, there is exactly one digit from 0 to 9. Masha became interes
阅读全文
摘要:Little Tom loves playing games. One day he downloads a little computer game called 'Bloxorz' which makes him excited. It's a game about rolling a box
阅读全文
摘要:Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world.
阅读全文
摘要:定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要
阅读全文
摘要:Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe
阅读全文