Treasure of the Chimp Island Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 313    Accepted Submission(s): 151 Problem Description Bob Bennett, the young adventurer, has found the map to the tr…
Treasure of the Chimp Island Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 207 Accepted Submission(s): 84   Problem Description Bob Bennett, the young adventurer, has found the map to the treasu…
[LeetCode]Island Perimeter 解题报告 [LeetCode] https://leetcode.com/problems/island-perimeter/ Total Accepted: 16143 Total Submissions: 28552 Difficulty: Easy Question You are given a map in form of a two-dimensional integer grid where 1 represents land…
bfs().题目的数据乱码.应该如下: *****#********* *.......$...* *..***.......* *....*****..* *....******37A *****......* *.....******..* ***CA********** ***** *$** *.** ***#* -- #include <iostream> #include <queue> #include <cstring> #include <cstd…
题目要求 You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 减去相交部分 参考资料 日期 题目地址:https://leetcode.com/problems/island-perimeter/description/ 题目描述 You are given a map in form of a two-dimensional integer grid where 1 represents land and 0…
目录: 1:一道简单题[树形问题](Bzoj 1827 奶牛大集会) 2:一道更简单题[矩阵乘法][快速幂] 3:最简单题[技巧] 话说这些题目的名字也是够了.... 题目: 1.一道简单题 时间1s 题目描述 Bessie正在计划一年一度的奶牛大集会,来自全国各地的奶牛将来参加这一次集会.当然,她会选择最方便的地点来举办这次集会.每个奶牛居住在 N(1<=N<=100,000) 个农场中的一个,这些农场由N-1条道路连接,并且从任意一个农场都能够到达另外一个农场.道路i连接农场A_i和B_i…
120. Archipelago time limit per test: 0.25 sec. memory limit per test: 4096 KB Archipelago Ber-Islands consists of N islands that are vertices of equiangular and equilateral N-gon. Islands are clockwise numerated. Coordinates of island N1 are (x1, y1…
Highways Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 23033   Accepted: 10612 Description The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Fl…
127. Telephone directory time limit per test: 0.25 sec. memory limit per test: 4096 KB CIA has decided to create a special telephone directory for its agents. The first 2 pages of the directory contain the name of the directory and instructions for a…
126. Boxes time limit per test: 0.25 sec. memory limit per test: 4096 KB There are two boxes. There are A balls in the first box, and B balls in the second box (0 < A + B < 2147483648). It is possible to move balls from one box to another. From one…
123. The sum time limit per test: 0.25 sec. memory limit per test: 4096 KB The Fibonacci sequence of numbers is known: F1 = 1; F2 = 1; Fn+1 = Fn + Fn-1, for n>1. You have to find S - the sum of the first K Fibonacci numbers. Input First line contains…
119. Magic Pairs time limit per test: 0.5 sec. memory limit per test: 4096 KB “Prove that for any integer X and Y if 5X+4Y is divided by 23 than 3X+7Y is divided by 23 too.” The task is from city Olympiad in mathematics in Saratov, Russia for schoolc…
118. Digital Root time limit per test: 0.25 sec. memory limit per test: 4096 KB Let f(n) be a sum of digits for positive integer n. If f(n) is one-digit number then it is a digital root for n and otherwise digital root of n is equal to digital root o…
117. Counting time limit per test: 0.25 sec. memory limit per test: 4096 KB Find amount of numbers for given sequence of integer numbers such that after raising them to the M-th power they will be divided by K. Input Input consists of two lines. Ther…
116. Index of super-prime time limit per test: 0.25 sec. memory limit per test: 4096 KB Let P1, P2, … ,PN, … be a sequence of prime numbers. Super-prime number is such a prime number that its current number in prime numbers sequence is a prime number…
115. Calendar time limit per test: 0.25 sec. memory limit per test: 4096 KB First year of new millenium is gone away. In commemoration of it write a program that finds the name of the day of the week for any date in 2001. Input Input is a line with t…
113. Nearly prime numbers time limit per test: 0.25 sec. memory limit per test: 4096 KB Nearly prime number is an integer positive number for which it is possible to find such primes P1 and P2 that given number is equal to P1*P2. There is given a seq…
111.Very simple problem time limit per test: 0.5 sec. memory limit per test: 4096 KB You are given natural number X. Find such maximum integer number that it square is not greater than X. Input Input file contains number X (1≤X≤101000). Output Write…
105. Div 3 time limit per test: 0.25 sec. memory limit per test: 4096 KB There is sequence 1, 12, 123, 1234, ..., 12345678910, ... . Given first N elements of that sequence. You must determine amount of numbers in it that are divisible by 3. Input In…
104. Little shop of flowers time limit per test: 0.25 sec. memory limit per test: 4096 KB PROBLEM You want to arrange the window of your flower shop in a most pleasant way. You have F bunches of flowers, each being of a different kind, and at least a…
103. Traffic Lights Time limit per test: 0.25 second(s)Memory limit: 4096 kilobytes input: standardoutput: standard In the city of Dingilville the traffic is arranged in an unusual way. There are junctions and roads connecting the junctions. There is…
102. Coprimes time limit per test: 0.25 sec. memory limit per test: 4096 KB For given integer N (1<=N<=104) find amount of positive numbers not greater than N that coprime with N. Let us call two positive integers (say, A and B, for example) coprime…
Channel Allocation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12334   Accepted: 6307 Description When a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that every receiver has a s…
Pots Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10042   Accepted: 4221   Special Judge Description You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i)        f…
A Knight's Journey Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 31195   Accepted: 10668 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey ar…
Sudoku Checker Time Limit: 2000/1000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others) SubmitStatisticNext Problem Problem Description Sudoku is a popular single player game. The objective is to fill a 9x9 matrix with digits so that each colu…
Robot Motion Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 10708   Accepted: 5192 Description A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in…
Crashing Robots Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7799   Accepted: 3388 Description In a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destination…
Parencodings Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19716   Accepted: 11910 Description Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn…