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
_1003题解
排版题.输出三角形的字符Problem用英文大写字母排列出一个三角形Input一个整数N(0charch='A';intn;voidprintLine(intt){inti;for(i=1;i<=n-t;i++){printf("");}for(i=1;i<=2*t-1;i++){printf("%c",ch);}printf("\n");ch=ch+1;}intmain(){inti;scanf
weixin_34357436
·
2020-08-09 14:11
TOJ
2017: N-Credible Mazes
2017:N-CredibleMazesTimeLimit(Common/Java):1000MS/10000MSMemoryLimit:65536KByteTotalSubmit:6Accepted:0DescriptionAnn-tersectionisdefinedasalocationinn-dimensionalspace,nbeingapositiveinteger,havingall
weixin_34163553
·
2020-08-09 14:58
toj
2991 Simple Task II 二次剩余
/**
toj
2991.c**Createdon:2011-10-13*Author:bjfuwangzhu*//*给出整数n,统计二次同余方程x^2=1(modn)在[0,n)闭区间上的解的个数。
weixin_34067102
·
2020-08-09 14:12
数集合有多少个
TOJ
(2469)
题目链接:http://acm.tju.edu.cn/
toj
/showp2469.html感觉这个题目有点问题,算了不管他了,反正A了。
weixin_34050519
·
2020-08-09 14:40
oj
知名的OJ有:RQNOJ,URAL,SPOJ,vijos,USACO,sgu,pku(poj),zju(
toj
),tju,uva等。
weixin_33923762
·
2020-08-09 14:19
TOJ
4244: Sum
4244:SumTimeLimit(Common/Java):3000MS/9000MSMemoryLimit:65536KByteTotalSubmit:63Accepted:10DescriptionGivenasequence,wedefinetheseqence'svalueequalsthedifferencebetweenthelargestelementandthesmalleste
weixin_33895657
·
2020-08-09 14:14
TOJ
1036
//注意下控制格式#include#include#includeusingnamespacestd;boolis_match(queueq,intnum){inti,j,k;stacks;for(i=1;i>T,T){while(1){queues;intnum,temp=1;//temp必须初始化为非零值,否则下一次的temp直接为0for(i=1;i>num;if(num==0){temp=
weixin_33860737
·
2020-08-09 14:06
TOJ
1923
1923.TanningSalonTimeLimit:1.0SecondsMemoryLimit:65536KTotalRuns:924AcceptedRuns:556TanYourHide,Inc.,ownsseveralcoin-operatedtanningsalons.Researchhasshownthatifacustomerarrivesandtherearenobedsavaila
weixin_33709219
·
2020-08-09 14:35
TOJ
_12470
#includestructnode{intx;inty;intstep;}first;intzx[4]={-1,0,1,0};intzy[4]={0,-1,0,1};inta[10][10]={0};intg[10];intf=0;nodequeue[100]={0};inthead=0,tail=0;intflagx,flagy,flag1x,flag1y;//进栈voiden(nodeE){
weixin_30917213
·
2020-08-09 14:54
TOJ
1005 Hero In Maze (深搜)
描述500年前,Jesse是我国最卓越的剑客。他英俊潇洒,而且机智过人^_^。突然有一天,Jesse心爱的公主被魔王困在了一个巨大的迷宫中。Jesse听说这个消息已经是两天以后了,他知道公主在迷宫中还能坚持T天,他急忙赶到迷宫,开始到处寻找公主的下落。时间一点一点的过去,Jesse还是无法找到公主。最后当他找到公主的时候,美丽的公主已经死了。从此Jesse郁郁寡欢,茶饭不思,一年后追随公主而去了。
weixin_30909575
·
2020-08-09 14:23
TOJ
---2754---类似于字符串匹配
先去开撸了把代码贴上^^一段暴力TLE--一段AC---暴力:TLE1#include2#include3#include4usingnamespacestd;56constintsize=50010;7charstr[size];//开头8charch[size];//结尾910intmain()11{12inti,j;13intlen1,len2;14intnum;15boolflag;16w
weixin_30873847
·
2020-08-09 14:18
TOJ
4829: 计算器的改良
Python写法!传送门:http://acm.tzc.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=4829描述NCL是一家专门从事计算器改良与升级的实验室,最近该实验室收到了某公司所委托的一个任务:需要在该公司某型号的计算器上加上解一元一次方程的功能。实验室将这个任务交给了一个刚进入的新手ZL先生。为了很好的完成这个任务,ZL先生首
weixin_30823227
·
2020-08-09 14:42
toj
部分题
//////2010#include#include#includeusingnamespacestd;mapm;boolPrime[10007];intP[10005],n;constintmaxn=10000;intmain(){n=0;memset(Prime,1,sizeof(Prime));Prime[0]=Prime[1]=0;for(inti=2;i>n&&n){intcount=0
weixin_30617797
·
2020-08-09 13:12
TOJ
3448: 小学生的作业
Python字符串的插入操作传送门:http://acm.tzc.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=3448时间限制(普通/Java):1000MS/3000MS内存限制:65536KByte描述给定用等号连接的两个整数,如“1234=127”。问能否在左边的整数中间某个位置插入一个加号使得等号成立。比如:123+4=127
weixin_30475039
·
2020-08-09 13:19
toj
2804 The Art Gallery Problem
TheArtGalleryProblemTimeLimit:1.0SecondsMemoryLimit:65536KIn1973,Kleeposedafascinatingproblem-theartgalleryproblem.Imagineanartgalleryroomwhosefloorplancanbemodeledbyapolygonofnvertices.Kleeasked:Howm
Claire_ljy
·
2020-08-09 13:42
toj
2807 Number Sort
2807.NumberSortTimeLimit:10.0SecondsMemoryLimit:65536KTotalRuns:469AcceptedRuns:160GivenyouNpositiveintegers,yourjobistooutputtheseNnumbersintheascendingorderineverydigit(iftwonumbersinsomedigitarethe
weixin_30419799
·
2020-08-09 13:39
天津大学
TOJ
题目,《square》
Givenasetofsticksofvariouslengths,isitpossibletojointhemend-to-endtoformasquare?ThefirstlineofinputcontainsN,thenumberoftestcases.Eachtestcasebeginswithaninteger4≤M≤20,thenumberofsticks.Mintegersfollo
weixin_30394333
·
2020-08-09 13:07
toj
1701 Stamps
1701.StampsTimeLimit:2.0SecondsMemoryLimit:65536KTotalRuns:3159AcceptedRuns:1053MultipletestfilesBackgroundEverybodyhatesRaymond.He'sthelargeststampcollectoronplanetearthandbecauseofthathealwaysmakesf
weixin_30387339
·
2020-08-09 13:35
c/c++
toj
2819 Travel
2819.TravelTimeLimit:1.0SecondsMemoryLimit:65536KTotalRuns:1042AcceptedRuns:458ThereareNcitiesinthiscountry,andsomeofthemareconnectedbyroads.Giventwocities,canyoufindtheshortestdistancebetweenthem?Inp
weixin_30379973
·
2020-08-09 13:04
TOJ
2814 Light Bulb
DescriptionComparedtowildleopard'swealthiness,hisbrothermildleopardisratherpoor.Hishouseisnarrowandhehasonlyonelightbulbinhishouse.Everynight,heiswanderinginhisincommodioushouse,thinkingofhowtoearnmor
weixin_30364325
·
2020-08-09 13:02
TOJ
1868. Count the factors
题目大意给出一个数n(n,里头保存了1000以内的素数。Code1intans(intk)2{3intre=0;4vector::iteratorit;5for(it=prime.begin();it!=prime.end();++it)6{7if(k%(*it)==0)8{9re++;10while(k%(*it)==0)11k/=*it;12}13}14if(k>1)15re++;16retu
weixin_30279671
·
2020-08-09 13:21
TOJ
简单版贪吃蛇(bfs)
简单版贪吃蛇TimeLimit(Common/Java):1000MS/3000MSMemoryLimit:65536KByteTotalSubmit:22Accepted:13SpecialJudgeDescription现在我们来简化蛇的身体,假设初始化的时候蛇的身体只有一个头而已(呵,当然是假设的),那么蛇去吃食物的时候就不必考虑碰到自己的身体了。例:55.....S....###.#E..
acceptedwwh
·
2020-08-09 13:55
ACM_搜索专项
TOJ
: 2844.Emergency Mission
2844:http://acm.tju.edu.cn/
toj
/showp2844.htmlintn,m,k,ans;vectorv;voidsolve(){v.clear();ans=0;inc(i,0
凉粥
·
2020-08-09 13:59
TOJ
二叉树 已知前序,中序求后序
TOJ
3988
由前序,中序来递归的求后序;其实就是按照前序的顺序,中序递归的分为左中右三部分。再分别递归;直到递归出口,即为后序字符;代码如下;#include#includeusingnamespacestd;stringpre,in;/*pre_s当前的前序的起始;pre_e当前前序的结束;in_s当前的中序的起始,in_e当前中序的结束*/voidPost(intpre_s,intpre_e,intin_
ShomyLiu
·
2020-08-09 13:28
TOJ
TOJ
2522 水~ Surprising Strings
题目来源:http://acm.tju.edu.cn/
toj
/showp.php?
ShomyLiu
·
2020-08-09 13:28
TOJ
TOJ
3153 Recursively Palindromic Partitions
题意求一个数的回文递归分解的个数,比如说数字7:71+5+12+3+2------1+1+3+1+13+1+3------1+1+1+1+1+1+1一共有6种分解的方法。思路题意就已经明了,思路按照上面的分解也就差不多了对于一个数分解的时候:只要保持左右相等,就是一种分解方法;可以递推来解决:f[0]=f[1]=1f[7]=f[0]+f[1]+f[2]+f[3]即可代码#includeusingn
ShomyLiu
·
2020-08-09 13:28
TOJ
TOJ
3515
importjava.util.Scanner;publicclassTOJ3515{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);intt=sc.nextInt();x=newint[SIZE];d=newint[SIZE];for(inti=0;ix_count){intcc=d_delete();x_ad
yyyyuusj
·
2020-08-09 12:55
TOJ
3070. Encryption
数字转ACS||码的方法为+'0';YoumusthaveheardofanancientencryptioncalledCaesarcipheror'shiftcipher'.Thatis,giventheplaintextandanumberD,youshouldreplaceeverycharactercintheplaintextwithanothercharacterwhichisDpl
章鱼鱼的ACM
·
2020-08-09 12:25
TOJ
1144. Tree Recovery
第一次做二叉树的题目,继续加油!LittleValentinelikedplayingwithbinarytreesverymuch.Herfavoritegamewasconstructingrandomlylookingbinarytreeswithcapitallettersinthenodes.Thisisanexampleofoneofhercreations: D/\/\BE/\\/\
章鱼鱼的ACM
·
2020-08-09 12:25
TOJ
1169. Error Correction
Abooleanmatrixhastheparitypropertywheneachrowandeachcolumnhasanevensum,i.e.containsanevennumberofbitswhichareset.Here'sa4x4matrixwhichhastheparityproperty:1010000011110101Thesumsoftherowsare2,0,4and2.
章鱼鱼的ACM
·
2020-08-09 12:25
TOJ
3582图书馆查询系统
3582:图书馆查询系统时间限制(普通/Java):1000MS/3000MS内存限制:65536KByte总提交:565测试通过:126描述台州学院图书馆是一个馆藏丰富、发展迅速的地方性大学图书馆,截止2010年底,图书馆拥有馆藏纸质文献159.7万册。当然图书然必须具备一个图书查询系统,以便同学快速找到某一本书,请编写一个程序实现。输入测试数据有多组。每一组测试数据第一行为一个正整数n(n#i
sxy12138
·
2020-08-09 12:30
TOJ
1154. A Mathematical Curiosity
http://acm.tju.edu.cn/
toj
/showp1154.html这道题不难,但是WA了,看网上的介绍说是不能当m、n同时为0的时候退出,而是n=0的时候退出…不知道是为什么,改了之后竟然
roner404
·
2020-08-09 11:30
ACM刷题
TOJ
1196
http://acm.tju.edu.cn/
toj
/showp1196.html这道题大一的时候也做过,现在再做还是有点难。
roner404
·
2020-08-09 11:30
ACM刷题
TOJ
1171
http://acm.tju.edu.cn/
toj
/showp1171.html这是有关哥德巴赫猜想的一道题,大意是把一个大于4的偶数拆分成两个素数,且二者的差最大。
roner404
·
2020-08-09 11:30
ACM刷题
1127. DNA Sorting
http://acm.tju.edu.cn/
toj
/showp1127.html这道题比较简单,统计字符串中的每一个字母“大于”后面字母的个数之和,然后按照从小到大的顺序输出。
roner404
·
2020-08-09 11:30
ACM刷题
TOJ
1090
http://acm.tju.edu.cn/
toj
/showp1090.html首先是题意没理解对,砖块只能一列一列地放,数量可以是从1到M,求每一种数量对应的最小砖块数。
roner404
·
2020-08-09 11:29
ACM刷题
广告印刷
【题目描述】最近,afy决定给
TOJ
印刷广告,广告牌是刷在城市的建筑物上的,城市里有紧靠着的N个建筑。afy决定在上面找一块尽可能大的矩形放置广告牌。
jrxjs
·
2020-08-09 10:43
TOJ
_1002解题报告
全排序问题Problem将一个字符组全排序Input一个长度小于10的字符串,该字符串由数字1~9组成。字符不会重复出现。Output按数字在输入串中出现的次序从小到大的顺序输出该字符组的全排序SampleInput132SampleOutput132123312321213231========================================分析:应该是用递归来穷举所有的排列情况
phinecos
·
2020-08-09 10:13
ACM
考研心得
TOJ
1809.Playground(构成多边形条件)
题目链接:http://acm.tju.edu.cn/
toj
/showp1809.html1809.PlaygroundTimeLimit:1.0SecondsMemoryLimit:65536KTotalRuns
暮雨rainy
·
2020-08-09 09:49
计算几何
Toj水题
TOJ
3778.Sheldon's Friendship II
题目链接:http://acm.tju.edu.cn/
toj
/showp3778.html3778.Sheldon'sFriendshipIITimeLimit:1.0SecondsMemoryLimit
暮雨rainy
·
2020-08-09 09:18
Toj水题
toj
水题
TOJ
3772.Rupxup's Math Problem
题目链接:http://acm.tju.edu.cn/
toj
/showp3772.htmlDescriptionRupxuphaslearnedanewfunctioncalledfunction"F(
暮雨rainy
·
2020-08-09 09:18
数论
计算几何
数学
TOJ
3516.Game of Stones
题目链接:http://acm.tju.edu.cn/
toj
/showp3516.html3516.GameofStonesTimeLimit:1.0SecondsMemoryLimit:65536KTotalRuns
暮雨rainy
·
2020-08-09 09:18
数学
toj
TOJ
3519.Ones and Zeros
题目链接:http://acm.tju.edu.cn/
toj
/showp3519.html3519.OnesandZerosTimeLimit:1.0SecondsMemoryLimit:65536KTotalRuns
暮雨rainy
·
2020-08-09 09:18
数论
数学
toj
数论
TOJ
2789.Monthly Expense(二分经典题目)
题目链接:http://acm.tju.edu.cn/
toj
/showp2789.htmlFarmerJohnisanastoundingaccountingwizardandhasrealizedhemightrunoutofmoneytorunthefarm.Hehasalreadycalculatedandrecordedtheexactamountofmoney
暮雨rainy
·
2020-08-09 09:17
二分
经典题目
TOJ
2894. Meetings(贪心基础)
题目链接:http://acm.tju.edu.cn/
toj
/showp2894.html2894.MeetingsTimeLimit:3.0SecondsMemoryLimit:65536KTotalRuns
暮雨rainy
·
2020-08-09 09:17
贪心算法
经典题目
TOJ
1163.Gone Fishing(经典题目)
题目链接这道题没得说真的特别经典,枚举+贪心经典题目:首先lake数很少,故可以枚举出john最终停留在每个lake的钓鱼数。确定了john最终停留的lake数后,就可以利用贪心算法每次钓最多的鱼,注意:虽然lake是单线单行,但这并不影响每次取最大,因为实际中依次钓每个湖即可,这种抽象意义上的贪心策略不好想,因此真的很经典!很经典!(重要的事说三遍)。通过这道题真的可以学到很多知识,总结如下:采
暮雨rainy
·
2020-08-09 09:17
贪心算法
枚举
经典题目
TOJ
3474.The Big Dance
题目链接:http://acm.tju.edu.cn/
toj
/showp3474.html3474.TheBigDanceTimeLimit:2.0SecondsMemoryLimit:65536KTotalRuns
暮雨rainy
·
2020-08-09 09:17
Toj水题
TOJ
3237.Change Base
题目链接:http://acm.tju.edu.cn/
toj
/showp3237.html3237.ChangeBaseTimeLimit:1.0SecondsMemoryLimit:65536KTotalRuns
暮雨rainy
·
2020-08-09 09:17
Toj水题
TOJ
1455.Ultra-QuickSort(分治经典题目)
题目链接题目大意很简单,就是要使一个序列非递减排序需要交换多少次,每次交换相邻的数字对。要明白本题要求的实际上是逆序对数。故可以采用归并排序并计算逆序数。这道题是非常经典的分治题目,通过这道题我的收获有:学习归并排序的写法怎样在归并中计算逆序对数cstring中的memcpy的用法#include#includeusingnamespacestd;intarr[500002],lef[500002
暮雨rainy
·
2020-08-09 09:17
分治
经典题目
TOJ
3105.A Way To Find Primes(埃式筛法)
题目链接:http://acm.tju.edu.cn/
toj
/showp3105.html3105.AWayToFindPrimesTimeLimit:1.0SecondsMemoryLimit:65536KTotalRuns
暮雨rainy
·
2020-08-09 09:17
Toj水题
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
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
其他