- 博客(9)
- 资源 (5)
- 收藏
- 关注
原创 uva699 the falling leaves
#include #include int pile[200], temp; char str[1000]; void dfs(int pos) { scanf("%d", &temp); if (temp < 0) return; pile[pos] += temp; dfs(pos-1); dfs(pos+1); } int main() {
2015-01-31 23:40:28 447
原创 uva839 not so mobile
#include using namespace std; //输入一个子天平,返回天平是否平衡,参数W修改为子天平的总重量 bool solve(int& W){ int W1, D1, W2, D2; bool b1 = true, b2 = true; cin >> W1 >> D1 >> W2 >> D2; if(!W1) b1 = solve(W1);
2015-01-31 23:27:43 472
原创 uva679 dropping balls
#include #include const int maxd = 20; int s[1<<maxd]; int main() { int D, I, N; scanf("%d", &N); while(N--) { scanf("%d", &D); if(D == -1) break; scanf("%d", &I);
2015-01-31 23:06:41 490
原创 uva12657 boxes in a line
#include #include using namespace std; const int N = 100005; int le[N], ri[N], n, m; typedef long long ll; void link(int l, int r)//链接l和r,l在左边 { le[r] = l; ri[l] = r; } int main() { int cas =
2015-01-31 22:30:35 862
原创 uva11988 broken keyboard
#include #include const int maxn = 100000 + 5; int last, cur, next[maxn]; char s[maxn]; int main() { while(scanf("%s", s+1) == 1) { int n = strlen(s+1); last = cur = 0; nex
2015-01-31 21:52:34 591
原创 数据结构之数组实现
//模拟数组 #include #include #include //定义了一个数据类型,该数据类型的名字叫struct ,3个成员 struct Arr { int * pBase;//存储的是数组的第一个的地址 int len;//数组所能容纳最大元素的个数 int cnt;//当前数组有效元素的个数 // int increment;//自动增长银因子 };
2015-01-24 23:03:00 504
原创 Data Mining UVA1591原题翻译+题解
Dr. Tuple is working on the new data-mining application for Advanced Commercial Merchandise Inc. Tuple先生工作在新的数据挖掘应用对先进的商业货物。(明显句子不通。。。) One of the subroutines for this application works with two arra
2015-01-01 21:13:12 2076
原创 Flooded UVA815翻译原题+代码
英语实在是不好,题意都看不懂,背单词又背不下去,那就慢慢翻译吧,反正没事干。 翻译不求用词精准,句子也可能不通顺, 只是能理解了题意就好。 To enable homebuyers to estimate the cost of flood insurance, a real-estate firm provides clients with the elevation of each 10-
2015-01-01 19:25:40 2033 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人