# UVA Java: An Introduction to Competitive Programming ## Introduction UVA Java refers to the practice of using Java programming language to solve problems on UVA Online Judge, a popular platform fo
原创 2023-08-04 09:29:46
52阅读
Description UVa Panel DiscussionThe UVa online judge team is arranging a panel discussion for the next ACM-ICPC World Finals event in Orlando, Florida...
转载 2015-07-12 18:50:00
142阅读
2评论
虽然自己写过很多题,也参加很多比赛,但是因为自己是半路”出家“,起步也比较慢,一开始就是针对比赛学习得。一下。TEX QuotesUV...
原创 2022-08-22 17:46:18
64阅读
自从这个暑假,吴昊学长跟我们讲了数论,然后做了那个多校的数论之后,好像
原创 2022-08-25 11:02:14
90阅读
【题目】​​点击打开链接​​【题意】给你m,n求最大的k使得是n!的因子;【解题思路】把m质因子分解为,设p为pi中最大的素数,,然后求n!中p的个数即为为b(这里的pi为p),即为答案(对于i,求出相应的b,最小的)【AC代码】#include <stdio.h>#include <math.h>#include <limits.h>#include <
原创 2022-04-20 10:13:51
61阅读
/* 这题说的的是 N 维的坐标, 每个盒子的N维坐标 可以进行 随意方式的调换 然后求出 A全部的坐标小于B的 则 A 可以嵌套在B中 然后 计算出最多的 盒子嵌套个数 简单的状态转移 我为何如此的弱*/#include #include #include #include #include #include #include using namespace std;const int maxn=35;const int maxm=15;int N[maxn][maxm];int dp[maxn];int lis,mlis,n,m,per[maxn];bool mark[maxn][...
原创 2021-07-28 11:45:17
170阅读
如果我们设f[i]为4个柱子时把i个东东从一个柱子移到另一个柱子所用的最少步骤,设g[i]为3个柱子时对应的值,我们可以得到f[n]=min{2*f[k]+g[n-k]},其中g[i]是已知的为2^i-1。 然后接着就搞不下去了,看了别人报告说要找规律。有了上面的式子之后,我们打印前60个解还是很好...
原创 2021-07-28 11:47:55
121阅读
// 扩展欧几里得算法 // 先求出一个解 再求出区间 [x1,x2]有几个整数符合条件// 需要注意的是 水平和垂直2种情况的处理 还有正数和负数取整的细微差别#include #include #include #include #include #include #include using namespace std;#define MOD 1000000007#define maxn 1000010#define maxm 48010#define LL long longLL ax,ay,bx,by;LL a,b,c;LL d,x,y;void extendGcd(LL a,LL.
UVA
原创 2021-07-29 16:26:09
172阅读
Andy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he k...
原创 2021-09-01 11:40:43
101阅读
RMQ的应用,因为题目给定的数组相同的数字都是在一起,这意味着非常紧凑,借助RMQ,最值只可能有三种情况 频率最高是因为最左边的数 频率最高是因为最右边的数 将整个数组所有相同的数全部放在一个频数数组里面,所询问的区间内完整包含的那些数的频数最值可以利用RMQ来获取 #include <iostre ...
转载 2021-09-04 23:43:00
114阅读
一开始没怎么看懂题目,原来就是M字符就是这一列的宽度为M个字符,包括空格。
转载 2016-11-21 13:36:00
85阅读
2评论
In this problem you are to generate a triangular wave form according to a specified pair of Amplitude and Frequency.Input and OutputThe input begins with a single positive integer on a line by itself ...
转载 2010-10-25 22:25:00
485阅读
2评论
Problem H: Partitioning by PalindromesWe say a sequence of chara
转载 2013-08-05 20:17:00
49阅读
bitch bitch bitch...TLE,WA一大坨,我是在拿生命来JUDGE啊。。不得不说,UVA上的数据根本不是随机的,而是有预谋的。 for(int i=2;i1&&cross(p[i],p[st[stop-1]],p[st[stop-2]])>=0) stop--; //这个我本来是...
转载 2014-08-05 21:36:00
64阅读
2评论
这题一开始比较错了。两字符串比较应该是 ab和ba两字符串连接起来比较,谁在前面大就排前面。#include #include #include #include using namespace std;struct Num{ char str[1000];}num[60];char tmp1[10...
转载 2015-06-04 10:43:00
85阅读
2评论
自己之前的不见了。。这题是双向广搜即可过。。 1 // Colour Hash (色彩缤纷游戏) 2 // PC/UVa IDs: 110807/704, Popularity: B, Success rate: average Level: 3 3 // Verdict: Accepted ...
转载 2014-06-18 14:19:00
91阅读
2评论
题目例如以下: Bandwidth Given a graph (V,E) where V is a set of nodes and E is a set of arcsin VxV, and an ordering on the elements in V, then the bandwidth
转载 2017-07-07 14:54:00
115阅读
2评论
题意:给定两个点A和B,求穿过这两个点的面积lude <cmath>usin
原创 2023-06-29 00:00:59
45阅读
题意:有n个点,找一条直线,让所有点都在直线的同一侧(也,所有点到其的距离和,根据计
原创 2023-06-29 00:01:26
70阅读
题意:题解:
原创 2023-06-29 00:02:20
22阅读
  • 1
  • 2
  • 3
  • 4
  • 5