
其他OJ
ZJU_warren
水,是人体重要组成部分。
展开
-
ZOJ 3499 M - Median
M - Median ZOJ 3499 Description A median is described as the numeric value separating the higher half of a list, from the lower half. The median of a finite list of numbers can be found by arranging原创 2016-06-23 20:08:58 · 581 阅读 · 0 评论 -
OpenJ_Bailian - 3859
OpenJ_Bailian - 3859Lake CountingTime Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64uSubmitStatusDescriptionDue to recent rains, water has pooled in various places in原创 2016-06-23 19:45:20 · 475 阅读 · 0 评论 -
求1+2+3+...+n (老题)
题目求1+2+3+…+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。解题直接求和公式sum=(1+n)n/2,有乘法除法,+-模型*/,需要for这是一道非常老的面试题,今天又遇到了就记录下吧,等学的更熟练时,再补充解法#include <bits/stdc++.h>using namespace std;long l原创 2016-06-26 21:07:57 · 1687 阅读 · 0 评论 -
6.4.1 用DFS求连通块 UVA 572 Oil Deposits DFS水题
#include <cstdio>#include <cstring>int M,N;char A[101][101];int B[101][101]={};void DFS(int i,int j,int ID){ if(i<1||i>M||j<1||j>N) return;//界外 if(B[i][j]||A[i][j]!='@') return;//已经访问过或者原创 2016-06-23 19:42:40 · 502 阅读 · 0 评论 -
7.4.2 Prime Ring Problem UVA 524
#include <cstdio>#include <cstring>int A[19];int USED[19]={};char Pri[1001]={};void Sev(void)//先打素数表{ for(int i=2;i<=1000;i++) if(!Pri[i]) for(int j=i*2;j<=1000;j+=i) Pri[j]=1;}void原创 2016-06-23 19:43:57 · 405 阅读 · 0 评论 -
UVA 424
DescriptionOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers.``This原创 2016-07-20 09:40:34 · 484 阅读 · 0 评论 -
Problem 2191 完美的数字
Problem 2191 完美的数字Accept: 41 Submit: 121Time Limit: 1000 mSec Memory Limit : 32768 KBProblem DescriptionBob是个很喜欢数字的孩子,现在他正在研究一个与数字相关的题目,我们知道一个数字的完美度是 把这个数字分解成三个整数相乘A * A * B(0< A <=B)的方法数,例如数字80可以分解成原创 2016-06-23 19:37:05 · 395 阅读 · 0 评论 -
Quicksum
QuicksumTime Limit: 2 Seconds Memory Limit: 65536 KBA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum wi原创 2016-06-23 19:33:51 · 417 阅读 · 0 评论 -
Modular Inverse
Modular InverseTime Limit: 2 Seconds Memory Limit: 65536 KBThe modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (mod m). This is equivalent to ax≡1原创 2016-06-23 19:34:21 · 512 阅读 · 0 评论 -
Find the Spy
Find the SpyTime Limit: 2 Seconds Memory Limit: 65536 KBWhoooa! There is a spy in Marjar University. All we know is that the spy has a special ID card. Please find him out!InputThere are multip原创 2016-06-23 19:49:36 · 391 阅读 · 0 评论 -
LRU Caching
When accessing large amounts of data is deemed too slow, a common speed up technique is to keep a small amount of the data in a more accessible location known as a cache. The rst time a particular pie原创 2016-06-26 14:59:57 · 418 阅读 · 0 评论 -
ZOJ 3492 F - Kagome Kagome
F - Kagome KagomeDescriptionKagome kagome, kago no naka no tori waItsu itsu deyaru? Yoake no ban niTsuru to kame to subetta.Ushiro no shoumen daare?Translation:Kagome kagome, the bird in the cage原创 2016-06-23 20:10:48 · 484 阅读 · 0 评论 -
ZOJ 3498 L - Javabeans
L - JavabeansTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmitStatusPracticeDescriptionJavabeans are delicious. Javaman likes to eat javabeans very much.Javaman has原创 2016-06-23 20:10:04 · 398 阅读 · 0 评论 -
ZOJ 3487A - Ordinal Numbers
A - Ordinal NumbersDescription Ordinal numbers refer to a position in a series. Common ordinals include zeroth, first, second, third, fourth and so on. Ordinals are not often written in words, they原创 2016-06-23 20:07:50 · 449 阅读 · 0 评论