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…
Borg Maze Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8905   Accepted: 2969 Description The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to descr…
Descroption 原题链接 你有一个\(n*m\)的矩形,一开始所有格子都是白色,然后给出一个目标状态的矩形,有的地方是白色,有的地方是黑色,你每次可以选择一个连通块(四连通块,且不要求颜色一样)进行染色操作(染成白色或者黑色).问最少操作次数.\(1 \leq n, m, \leq 50.\) Solution 对目标矩形的同色联通块缩点,向相邻的异色联通块连边,代表先把该块和它所有相邻的块染成同色,再把该块染成异色.至于为什么是最优的我也不知道,考场上手玩出来的qwq那么这个图的某一颗…
有N个城市(编号0.1…N-1)和M条道路,构成一张无向图. 在每个城市里边都有一个加油站,不同的加油站的单位油价不一样. 现在你需要回答不超过100个问题,在每个问题中,请计算出一架油箱容量为C的车子,从起点城市S开到终点城市E至少要花多少油钱? 输入格式 第一行包含两个整数N和M. 第二行包含N个整数,代表N个城市的单位油价,第i个数即为第i个城市的油价pipi. 接下来M行,每行包括三个整数u,v,d,表示城市u与城市v之间存在道路,且车子从u到v需要消耗的油量为d. 接下来一行包含一个整…
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…
黑白图像直方图 发布时间: 2017年7月9日 18:30   最后更新: 2017年7月10日 21:08   时间限制: 1000ms   内存限制: 128M 描述 在一个矩形的灰度图像上,每个像素点或者是黑色的或者是白色的.黑色像素点用1表示,白色像素点用0表示.现在要求你编写一个程序,计算每列上黑色像素点的个数并输出.如下图所示是一个6∗8的黑板图像. 1 1 0 0 1 1 1 1  0 1 1 0 1 0 1 0  1 1 1 1 0 1 1 0  0 1 1 0 0 1 0 0 …
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…
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…
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…
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…