# Poj Solution 1015

```http://poj.org/problem?id=1015

//* @author: 82638882@163.com
import java.util.Scanner;
public class Main{
static short[] p,d;
static short[][][] arr,path;
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
int cnt=0;
while(true)
{
cnt++;
a=in.nextInt();
b=in.nextInt();
if(a==0&&b==0)break;
System.out.println("Jury #"+cnt);
p=new short[a+1];
d=new short[a+1];
for(int i=1;i<=a;i++)
{
p[i]=in.nextShort();
d[i]=in.nextShort();
}
dp();
{
{
" for prosecution and value "+((arr[a][b][add+k]-k)/2)+" for defence:");
print(a,b,k);
break;
}
{
" for prosecution and value "+((arr[a][b][add-k]+k)/2)+" for defence:");
print(a,b,-k);
break;
}
}
System.out.println();
System.out.println();
}
}

static void dp()
{
arr=new short[a+1][b+1][40*b+30];
path=new short[a+1][b+1][40*b+30];
st=-b*20;ed=-st;
for(int i=0;i<=a;i++)
for(int j=0;j<=b;j++)
for(int k=st;k<=ed;k++)
for(int i=1;i<=a;i++)
for(int j=0;j<=b;j++)
for(int k=st;k<=ed;k++)
{
{
}
}
}

static void print(int i,int j,int k)
{
if(i == 0 && j == 0 && k == 0) return ;