码迷,mamicode.com
首页 >  
搜索关键字:uva 116    ( 8022个结果
UVA - 11374 Airport Express (Dijkstra模板+枚举)
Description Problem D: Airport Express In a small city called Iokh, a train service, Airport-Express, takes residents to the airport more quickly than other transports. There are...
分类:其他好文   时间:2014-07-22 22:49:34    阅读次数:262
UVA 10036
dp题目,dp[i][j]=1表示前i个数字形成的表达式的值除以K之后可以余j#include #include using namespace std;int dp[10001][101];int a[10001];int main(){ int m,n,k,u; while(cin>>m){ w...
分类:其他好文   时间:2014-07-21 09:39:06    阅读次数:154
UVA - 10917 Walk Through the Forest (最短路+DP)
Description Problem C: A Walk Through the Forest Jimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to ...
分类:其他好文   时间:2014-07-21 09:27:14    阅读次数:300
uva 213 - Message Decoding (我觉得我的方法要比书上少很多代码,不保证好……)
#include #include #include char s[250]; char a[10][250]; int a1[4]; int a2[250]; char ch; int init(int len) { int tt=0; for(int i=1;i<=7;i++) { for(int j=0;j<(int)pow(2,i)-1;j++) ...
分类:其他好文   时间:2014-07-20 10:25:18    阅读次数:185
UVA - 10298 Power Strings (KMP求字符串循环节)
Description Problem D: Power Strings Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation a...
分类:其他好文   时间:2014-07-20 09:39:37    阅读次数:263
UVA 239 - Tempus et mobilius. Time and motion(置换周期)
UVA 239 - Tempus et mobilius. Time and motion 题目链接 题意:这题题意也是吊得飞起,看了老半天,大概是这样: 有一个放球的队列,和3个轨道(说白了就是栈),一个容纳5,1个12,1个12,每1分钟队列出一个小球,放入栈,如果放入5的满了,就把5的放回队列,头一个放入12的,如果12的满了,就把12的放回队列,头一个放入另一个12的栈,如果...
分类:其他好文   时间:2014-07-20 00:35:23    阅读次数:179
uva 232 - Crossword Answers
代码又是挺乱的,时间太紧没空整理,思路也不好~但能AC…… 看不清楚可以留言,或者加qq一起探讨 #include #include #include using namespace std; char s[11][11]; int num[11][11]; int vis[11][11]; int main() { int r,c; int t=0; while(sc...
分类:其他好文   时间:2014-07-19 23:38:39    阅读次数:313
uva 1368 - DNA Consensus String
题目上给的样例input格式存在一定问题,行末多空格。 在这上面纠结了几次…… #include #include #include const int maxn = 1100; int A[maxn]; int C[maxn]; int G[maxn]; int T[maxn]; char ans[maxn]; int ans_; int m,n; void judge(int pos) ...
分类:其他好文   时间:2014-07-19 23:26:29    阅读次数:347
UVA No Tipping
Problem A - No Tipping As Archimedes famously observed, if you put an object on a lever arm,it will exert a twisting force around the lever's fulcrum. Thistwisting is called torque and is equal to th...
分类:其他好文   时间:2014-07-19 23:13:39    阅读次数:343
UVA 10036 Divisibility
Consider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expr...
分类:其他好文   时间:2014-07-19 22:37:50    阅读次数:243
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!