摘要:
UVA_699 模拟题目所说的即可。#include<stdio.h>#include<string.h>#define MAXD 160#define MID 80int first, f[MAXD];void dfs(int cur){ int k; scanf("%d", &k); if(k == -1) return ; if(f[cur] == -1) f[cur] = k; else f[cur] += k; dfs(cur - 1); dfs(cur + 1);}void solve(){ ... 阅读全文
摘要:
UVA_712 模拟题目所说的即可。#include<stdio.h>#include<string.h>#define MAXD 200int N, M, g[10], a[10];char b[10], d[MAXD];void solve(){ int i, j, k; for(i = 1; i <= N; i ++) { scanf("%s", b); sscanf(b + 1, "%d", &k); g[k] = i; } scanf("%s", d); scanf("%d&q 阅读全文