## Tree Summing–解题报告

code：

#include <iostream>
#include <string>
using namespace std;
int flag=0,sum;
int search(int sum0)
{
char c_char;
int nod_number,L=0,r=0;
cin>>c_char;

if(!((cin>&g[……]

## I know the k-th integer

code：

```#include <stdio.h>
#[......]继续阅读```

## Game of Connections

code:

```#include <stdio.h>
#include <string.h>
char p[110][200];
{
i[......]继续阅读```

## Story of Tomisu Ghost

code：

`#include <cstdio[......]继续阅读`

## ID Codes–解题报告

#include <cstdio>
#include <algorithm>
#define MAX 100

using namespace std;

int main()
{
int length;
char str[MAX],str1[MAX];
while(gets([……]

#include <stdio.h>
#include <string.h>
#include <malloc.h>
int sum;
char *s;
typedef struct node
{
c[……]

## Expressions–解题报告

#include <stdio.h>
#include <string.h>
typedef struct nod
{
char word;
struct nod *right;
struct nod *left;
}node;

## The ? 1 ? 2 ? … ? n = k problem-解题报告

#include <stdio.h>
int N,n;
long k;
void spa()
{ int ln=1;
if(k<0)
k=-k;
while(ln*(ln+1)/2<k)
ln++;
while((ln*(ln+1)/2-k)%2!=0||(ln*(ln+1)/2-k)/2>2*ln[……]

## 虚拟oj-E – Train Swapping

http://acm.sdibt.edu.cn:8080/judge/contest/view.action?cid=395#problem/E

```#include<stdio.h>
int main(){
int a[100],n,l,num;
while(scanf("%d",&n)!=EOF){
while(n--){
scanf("%d",&l);
for([......]继续阅读```

## How Many Points of Intersection?–解题报告

#include <stdio.h>
int main()
{
int j,t=0;
long long sum,a,b;
while(scanf(“%lld%lld”,&a,&b),a||b)
{
sum=0;
t++;
for(j=0;j<b;j++)
sum+=a*(a-1)*(b-2*j-1)/2+a*(a[……]

## Master-Mind Hints解题报告

#include <stdio.h>
#include <string.h>
int N,se[1000],guess[1000],s[1000];
void pri()
{
int a=0,b=0,i,j;
memset(s,0,sizeof(int)*1000);
for(i=0;i<N;i++)
if(se[i]==guess[i])
{
a++[……]

## SDIBT1499-Super A^B mod C（FZU1759）

(SDIBT)
http://acm.sdibt.edu.cn/JudgeOnline/problem.php?id=1499
(FZU)
http://acm.fzu.edu.cn/problem.php?pid=1759

## 拓扑排序(推荐)——Reward

code：

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define N 100[……]

## 好题推荐——Ignatius and the Princess I

`偶然做到这道题，发现是一个很好的搜索练习题，它不像以前那种广搜题，只让求出`
`最小值，这题在求出最小值的同时还必须输出其走的路劲，也就说要在搜索的同时进行记录。`
`题意很明确，从起点出发到终点所需的最短时间，'.'表能通过，'X'表示不能通过，'数字'`
`表示正在fight，其实这题难得就是如何去记录上一个路劲，我们可以利用结构体，在搜寻下一个`
`的同时，记录上一个的坐标即可~~有意者可以做一下~~~`
`下面是我的代码，仅供参考;`
`code:`
`#include <cstdio&g[......]继续阅读`

## Beautiful Number

http://acm.sdibt.edu.cn/JudgeOnline/problem.php?id=1173

`#include<stdio.h> `
`int` `main(){ `
`    ``int` `a[300010],i,j=0,n; `
`    ``for``(i=1;i<300010;i++) `
`        ``if``(i%3==0||i%5==0) `
`            ``a[j++]=i; `
`    ``while``(``scanf``(``"%d"``,&n)!=EOF) `
`        ``printf``(``"%d\n"````,a[n-1]);[......] 继续阅读 ```

## Old Bill

http://acm.sdibt.edu.cn/JudgeOnline/problem.php?id=1184

`#include<stdio.h> `
`int` `main(){ `
`    ``int` `t; `
`    ``while``(``scanf``(``"%d"``,&t)!=EOF){ `
`        ``int` `n,x,z,y; `
`        ``while``(t--){ `
`            ``scanf``(``"%d%d%d%d"``,&n,&x,&y,&z); `
`            ````i[......] 继续阅读 ```

## DNA Sorting

http://acm.sdibt.edu.cn/JudgeOnline/problem.php?id=1160

`#include<stdio.h> `
`#include<stdlib.h> `
`struct` `s{ `
`    ``char` `a[51]; `
`    ``int` `c; `
`}dna[100]; `
`int` `cmp(``const` `void` `*a,``const` `void` `*b){ `
`    ``return` `(*(s *)a).c-(*(s *)b).c; `
`} `
`int` ```m[......] 继续阅读 ```