E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
TOJ
TOJ
2452 Ultra-QuickSort
描述 In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sor
·
2015-10-23 08:55
Quicksort
TOJ
3651 确定比赛名次
描述 有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排 名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定 排名。 输入 输入有若干组,每组中的第一行为二个数N(1<=N&l
·
2015-10-23 08:54
OJ
TOJ
2119 Tangled in Cables
描述 You are the owner of SmallCableCo and have purchased the franchise rights for a small town. Unfortunately, you lack enough funds to start your business properly and are relying on parts you have
·
2015-10-23 08:53
in
TOJ
3660 家庭关系
描述 给定若干家庭成员之间的关系,判断2个人是否属于同一家庭,即2个人之间均可以通过这些关系直接或者间接联系。 输入 输入数据有多组,每组数据的第一行为一个正整数n(1<=n<=100),表示有100个关系描述,接下来有n行,每行的描述方式为: p1 p2 c 其中p1、p2和c均为一串文本,表示每个人的姓名,p1和p2为c的父亲和母亲。 最后一行包含2个字符串a和b,
·
2015-10-23 08:53
关系
TOJ
2857 Stockbroker Grapevine
描述 Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the st
·
2015-10-23 08:53
broker
TOJ
2815 Connect them (kruskal+并查集)
描述 You have n computers numbered from 1 to n and you want to connect them to make a small local area network (LAN). All connections are two-way (that is connecting computers i and j is the same as c
·
2015-10-23 08:53
connect
TOJ
3744 Transportation Costs
描述 Minya Konka decided to go to Fuzhou to participate in the ACM regional contest at their own expense.Through the efforts, they got a small amount of financial support from their school, but the s
·
2015-10-23 08:52
port
TOJ
3488 Game Dice
描述 In the game of Dungeons & Dragons, players often roll multi-sided dice to generate random numbers which determine the outcome of actions in the game. These dice come in various flavors and sh
·
2015-10-23 08:51
game
TOJ
1836 Play on Words
描述 Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is very
·
2015-10-23 08:51
word
TOJ
1690 Cow Sorting (置换群)
Description Farmer John's N (1 ≤ N ≤ 10,000) cows are lined up to be milked in the evening. Each cow has a unique "grumpiness" level in the range 1...100,000. Since grumpy cows are more li
·
2015-10-23 08:50
sort
TOJ
4523 Transportation
Description Given N stations, you want to carry goods from station 1 to station N. Among these stations, we use M tubes to connect some of them. Each tube can directly connect K stations with each o
·
2015-10-23 08:48
port
TOJ
1023 Taxi Cab Scheme
Description Running a taxi station is not all that simple. Apart from the obvious demand for a centralised coordination of the cabs in order to pick up the customers calling to get a cab as soon as
·
2015-10-23 08:48
Scheme
TOJ
4289 Unrequited Love
Description There are n single boys and m single girls. Each of them may love none, one or several of other people unrequitedly and one-sidedly. For the coming q days, each night some of them will
·
2015-10-23 08:48
love
TOJ
1721 Partial Sums
Description Given a series of n numbers a1, a2, ..., an, the partial sum of the numbers is defined as the sum of ai, ai+1, ..., aj.You are supposed to calculate how many partial sums of a given seri
·
2015-10-23 08:48
part
TOJ
3176 Challenge from XOR
Description Mr. AngelClover just learnt XOR on his Computer Class. XOR is a bit arithmetic operator that returns one value if one, but not both, of its operands is one. It is also called Exclusive-O
·
2015-10-23 08:47
ROM
TOJ
2926 Series
Description An arithmetic series consists of a sequence of terms such that each term minus its immediate predecessor gives the same result. For example, the sequence 3, 7, 11, 15 is the terms of the
·
2015-10-23 08:47
IE
TOJ
1883 Domino Effect
Description Did you know that you can use domino bones for other things besides playing Dominoes? Take a number of dominoes and build a row by standing them on end with only a small distance in betw
·
2015-10-23 08:47
effect
TOJ
4008 The Leaf Eaters(容斥定理)
Description As we all know caterpillars love to eat leaves. Usually, a caterpillar sits on leaf, eats as much of it as it can (or wants), then stretches out to its full length to reach a new
·
2015-10-23 08:47
400
TOJ
3031 Multiple
Description a program that, given a natural number N between 0 and 4999 (inclusively), and M distinct decimal digits X1,X2..XM (at least one), finds the smallest strictly positive multiple of N that
·
2015-10-23 08:46
IP
TOJ
1258 Very Simple Counting
Description Let f(n) be the number of factors of integer n. Your task is to count the number of i(1 <= i < n) that makes f(i) = f(n). Input One n per line (1 < n <= 1000000). There
·
2015-10-23 08:46
simple
TOJ
2888 Pearls
Description In Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces a lot of jewelry with pearls in it. The Royal Pearl has its name because it delivers to the royal
·
2015-10-23 08:46
PEAR
TOJ
3635 过山车
Description RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找 个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意 和linle或LL做partner,PrincessSnow愿意和水域
·
2015-10-23 08:44
OJ
TOJ
3486 Divisibility
Description On the planet Zoop, numbers are represented in base 62, using the digits 0, 1, . . . , 9, A, B, . . . , Z, a, b, . . . , z where A (base 62) = 10 (base 10) B (base 62) = 11 (base 10) ...
·
2015-10-23 08:44
visibility
TOJ
1840 Jack Straws
Description In the game of Jack Straws, a number of plastic or wooden "straws" are dumped on the table and players try to remove them one-by-one without disturbing the other straws. Here,
·
2015-10-23 08:44
raw
TOJ
4003 Next Permutation
描述 It is an interesting exercise to write a program to print out all permutations of 1, 2, …, n. However, since there are 6227020800 permutations of 1, 2, …, 13, it is unlikely that we would ever r
·
2015-10-23 08:42
ext
TOJ
4119 Split Equally
描述 Two companies cooperatively develop a project, but they don’t like working with one another. In order to keep the company together, they have decided that only one of them will work on each job.
·
2015-10-23 08:42
split
TOJ
2749 Absent Substrings
描述 Given a string of symbols, it’s natural to look it over and see what substrings are present. In this problem, you are given a string and asked to consider what substrings are absent. Of course, a
·
2015-10-23 08:41
substring
TOJ
4002 Palindrome Generator
描述 A palindrome is a number that reads the same whether you read it from left to right or from right to left. Here is a surprising fact. Suppose we start with a number n. We reverse the digits of n
·
2015-10-23 08:41
generator
最大递增子序列变形——二维 O(n*logn)
TOJ
4701
1 #include <cstring> 2 #include <iostream> 3 #include <algorithm> 4 5 using namespace std; 6 7 class Node 8 { 9 public: 10 int x; 11 int y; 12 bool
·
2015-10-21 13:24
log
TOJ
3858 Home & GCPC 2015 D Carpets 小规模平铺类搜索
这里讨论一下小规模平铺类搜索的一种写法。说明一下讨论的范围:平铺:不允许重叠,将给出的一些方块(最容易处理的是长方形了)放置在一个目标区域内小规模:要放置的方块数量0,b>0).Nowgivenyoutheinformationaboutthefurnituresandtelluswhetherpoormancanmoveallhisfurnituresintohisnewhouse.InputT
fcxxzux
·
2015-09-27 01:00
搜索
【欧拉函数】
TOJ
4125. Game
从大到小枚举约数。。。然后就是欧拉函数就是当前约数的个数。。。#include #include #include #include #include #include #include #include #include #include #include #include #include #definemaxn1000005 #definemaxm5000005 #defineeps1e-7
blankcqk
·
2015-09-17 18:00
数论
欧拉函数
单调队列水题 刷广告
【问题描述】最近,afy决定给
TOJ
印刷广告,广告牌是刷在城市的建筑物上的,城市里有紧靠着的N个建筑。afy决定在上面找一块尽可能大的矩形放置广告牌。
DoJintian
·
2015-08-10 10:00
ACM
TOJ
4120 Zombies VS Plants
链接:http://acm.tju.edu.cn/
toj
/showp4120.html4120.ZombiesVSPlantsTimeLimit:1.0SecondsMemoryLimit:65536KTotalRuns
basasuya
·
2015-07-25 09:00
【贪心】
TOJ
4121. Muxiaokui's Problem
对两个连通块做最小生成树,然后中间的边选一条代价最小的就行了。。。。#include #include #include #include #include #include #include #include #include #include #include #include #include #definemaxn1005 #definemaxm1000005 #defineeps1e-7
blankcqk
·
2015-07-20 20:00
贪心
toj
. Job Scheduling
思路应该是按开始时间进行排序,再用优先队列#include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; #defineINF0x3f3f3f3f #defineinf-0x3f3f3f3f
acm_fighting
·
2015-07-20 19:00
toj
4124.Function
一开始直接用数学公式去推,结果到比赛结束也没有做出来,正确方法应该是预处理+递推#include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; #defineINF0x3f3f3f3f #de
acm_fighting
·
2015-07-20 19:00
toj
4121. Muxiaokui's Problem
比赛的时候以为是道神题,原来是水题分别对处于0的位置的和处于1的位置的进行最小生成树#include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; #defineINF0x3f3f3f3f #
acm_fighting
·
2015-07-20 19:00
toj
4120.Zombies VS Plants
注意空格哪里都有,而且用数组的话要开到千万#include #include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; #defineINF0x3f3f3f3f #defineinf-0x
acm_fighting
·
2015-07-20 19:00
优先队列运用
TOJ
4123 Job Scheduling
链接:http://acm.tju.edu.cn/
toj
/showp4123.html4123.JobSchedulingTimeLimit:1.0SecondsMemoryLimit:65536KTotalRuns
basasuya
·
2015-07-20 16:00
优先队列运用
TOJ
4123 Job Scheduling
链接:http://acm.tju.edu.cn/
toj
/showp4123.html4123.
basasuya
·
2015-07-20 16:00
TOJ
4127. God Le's Tree
连接后的新树的直径要么是原树的直径。。。要么是连接的两个点各自的最长链加1.。。。先预处理每个点的最长链,然后存储一颗树的最长链,另外一颗树遍历每个节点,二分+前缀和求出答案。。。#include #include #include #include #include #include #include #include #include #include #include #include #i
blankcqk
·
2015-07-20 14:00
TOJ
toj
3859. Letter Order
简单拓扑排序#include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; #defineINF0x3f3f3f3f #defineinf-0x3f3f3f3f #definelsonkG[m
acm_fighting
·
2015-07-16 20:00
toj
3858. Home
刚开始把它想成了贪心,结果怎么也出不来,结果只是简单地dfs加上回溯将一个方格看做一个点,刚开始全部置为0,若有物品放置,则置为1;#include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd
acm_fighting
·
2015-07-16 20:00
toj
3857. Jiong
其实题目略水,但看起来有点怕然后当\不能被系统识别时,可以在其前面再加一个\思路便是先把jiong用数组存起来,然后进行枚举#include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; #d
acm_fighting
·
2015-07-16 18:00
TOJ
toj
3860
本题略坑,给出的长度可能小于上面给出的进制的个数#include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; #defineINF0x3f3f3f3f #defineinf-0x3f3f3f
acm_fighting
·
2015-07-16 18:00
TOJ
【网络流】
TOJ
3864. SanXI
这题和HDOJ4307相似。。。本质上就是一个最小割的模型。。。http://blog.csdn.net/weiguang_123/article/details/8077385#include #include #include #include #include #include #include #include #include #include #include #include #in
blankcqk
·
2015-07-16 17:00
网络流
toj
3852. Haitang1
思路:将其转化为正方形,即求离给出的中心的距离在a-b之间的范围的点的数目法一:#include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; #defineINF0x3f3f3f3f #de
acm_fighting
·
2015-07-15 15:00
ACM
TOJ
【网络流】
TOJ
3854. Haitang2
先对0号节点做强连通,那么不在0号节点的强连通分量的点没有意义,可以舍弃掉。在0号节点的强连通分量里面的所有边都是至少走一次的,那么我们先统计答案,可以看出需要求的花的答案已经求出来了。原来强连通分量里面的边保留不变,流量设为无穷,费用为该边的费用,然后对连通分量所有点按度差建边,使全图入度和初度相同。。。跑出来的费用加上之前的费用就是最终答案。。。#include #include #inclu
blankcqk
·
2015-07-15 10:00
网络流
强连通分量
【枚举+贪心】【
TOJ
3981】【ICPC Balloons】
给你N种不同颜色气球,每种气球有个数目count[i],给的同种颜色气球可能是L尺寸,或M尺寸。 M个问题,每个问题有个解决人数ac[i]。每个问题要分配一种颜色的气球,尺寸要一样现在这些气球可能不符合条件但是可以将一种气球颜色刷成另一种(不管之前有没有),但是改变不了尺寸,问最少改变多少个气球颜色。N《50 M《15;枚举2^M次考虑某个问题是用L尺寸的还是M尺寸的接下来就跟L,M无关了然
zy691357966
·
2015-07-12 19:00
【DP】
TOJ
4103. Chinese Hockey 3
注意到只要是递减数列,总和为总分数,都符合题目意义。。。dp暴力打表,交表即可。。。#include #include #include #include #include #include #include #include #include #include #include #include #include #include #definemaxn100005 #definemaxm100
blankcqk
·
2015-07-11 09:00
dp
上一页
4
5
6
7
8
9
10
11
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他