”woj“ 的搜索结果

     *1101 数据范围太扯淡了。。如果不考虑范围的话可以这样想,从一个点到另外一个点他们的哈密顿距离为他们的最短距离,那么这个距离的步数就是我需要的最少步数,假设从一个点到另外一个点要走m步,那么首先从n个点...

     woj-land 这是一个分支,其创建者和维护者是 。目标计划对woj-land进行增强。 最近计划: 支持解释型语言(首先是 Python2、Python3 和 Ruby) 支持要求的其他语言(例如 Scala、Clojure 和 Brainf**k) 分布式判断...

     原题的链接:继续找相同-WOJ1204 Problem 1204 - 继续找相同 Time Limit: 1000MS Memory Limit: 5240KB Difficulty: 5  Total Submit: 2729 Accepted: 610 Special Judge: No Description 有 n 个整数, ...

     题目地址:woj1542 题目思路:就是以前做过的cf的D 细菌那一题 关键是先用并查集,然后给结点编号。 用map映射到0-200以内 代码: #include<iostream> #include<cstdio> #include<vector> #...

woj

标签:   woj

     1、整数拆分问题: 解决方法#include using namespace std;void maxsplit(int n){ int maxmultiply =1; if(n){ if(n){ return ; }else if(n==1||n==2||n==3

     一、实验目的及要求 1)实验问题:有 n 个整数, 其中有且仅有一个整数出现了 >= n/2.0 次 (n<...代码调试:WOJ平台 Ubuntu Linux 16.04 LTS 64bit 要求与限制: 内存默认限制为512MiB,栈空间

     作为Java选手感觉受到了歧视。。。一样的代码逻辑java就疯狂超时,c++瞬间秒杀???? c++真香 这件事情告诉我们,要用c++刷题,要讲武德,不能搞聪明,小聪明啊。 #include <... adjGraph, int begin,

woj1264

标签:   c语言

     #include<stdio.h> #include<stdlib.h> int MM1[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; int MM2[12] = { 31,29,31,30,31,30,31,31,30,31,30,31 }; ... if ((year % 4 == 0 &a...

WOJ1062

标签:   c语言

     Long time ago, people used to believe that they live on 2D world and if they will travel long enough in one direction, they will fall down over the edge. Even when it was proved that the Earth is ...

     A DNA chain is a sequence of proteins of 4 types. The types are encoded using the characters 'A', 'C', 'G', 'T'. Two proteins are called complementary if one is of type 'A' and the other is of type

     Dzs and Sproblvem love mathmatics, so when they play games they also want to find out the inner rules of the game.  The game they played is very classic.  There is a pile of stones, two players ...

     As the increase of population, the living space for people is becoming smaller and smaller. In MagicStar the problem is much worse. Dr. Mathematica is trying to save land by clustering buildings and

     Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID tag that the system will read as the cows pas

     KO loves candies. Most of all, he likes chocolate, strawberry and banana flavored ones. Now, he has N bags full of candies, each bag contains  some candies of all three flavors. KO knows the number o

     Help! Poor Magicpig is in trouble! There is a large room in the Pyramid called Room-of-No-Return. Very unfortunately, Magicpig is trapped in this room now! There are some hooks on the floor of the

     Flymouse and snoopy play the game of addition by adding an integer p with a number m(1 he always starts with p = 0,does his addition, then snoopy adds the number,then flymouse and so on....

     A network is composed of N computers connected by N - 1 communication links such that any two computers can be communicated via a unique route. Two computers are said to be adjacent if there is a comm

     1 题目 给一组 N 枚邮票的面值集合(如,{1 分,3 分})和一个上限 K —— 表示信封上能够贴 K 张邮票。计算从 1 到 M 的最大连续可贴出的邮资 例如,假设有 1 分和 3 分的邮票;你最多可以贴 5 张邮票。...

     In the courses of C programming, the teacher assigns an amusing problem to Flymouse: A string consists of several small lowercases. You should divide the string into several parts....

     Knuthocean's teacher asked him to sort some numbers ascending and get the times of exchanges (exchanges happen only between two neighboring letters), can you help him? 输入格式 ...

WOJ

     继续用DFS+记忆化剪枝来解决一般的dp ...Alex likes solving problems on WOJ (http://acm.whu.edu.cn/oak). As we all know, a beautiful balloon will appears when a problem is solved. Alex loves bal...

     Little Ginger got an assignment from her teacher: how many ways are there to put 4 apples in 2 baskets. There are no differences between apples and baskets. It?s easy for Ginger to solve, since she ca

2   
1