#include<stdio.h>
char A[100005], B[100005];
int b[10005];
int c[20005];
int d[20005];
int main()
{
while(gets(A))
{
gets(B);
int n;
scanf("%d", &n);
int i;
int s = 1;
for(i = 0; A[i]; i++)
{
if(A[i] >= '0' && A[i] <= '9')
b[s++] = A[i] - '0';
}
int flag = 1;
int j;
for(i = 1; i <= n; i++)
{
scanf("%d %d", &c[i], &d[i]);
for(j = 1; j < i; j++)
{
if(c[i] == c[j])
{
if(d[i] != d[j])
flag = 0;
}
}
}
if(flag)
printf("yes\n");
else
printf("no\n");
gets(A);
}
return 0;
}
离散题目12
最新推荐文章于 2018-06-04 10:47:08 发布