# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
2447 |
2013-07-22T00:16:50 Z |
tncks0121 |
백신 (KOI13_vaccine) |
C++ |
|
1000 ms |
1280 KB |
#include<stdio.h>
int a[101][1001];
int b[101];
int main(){
int n,k,i,j,p,q;
bool flag1,flag2,flag3,flag4,flag5,flag6;
scanf("%d%d",&n,&k);
for(i=0;i<n;i++){
scanf("%d",&b[i]);
for(j=0;j<b[i];j++){
scanf("%d",&a[i][j]);
}
}
for(i=0;i<b[0]-k+1;i++){
flag1=1;
if(i==2)
int sp=1;
for(j=1;j<n;j++){
flag2=0;
flag3=0;
for(p=0;p<b[j]-k+1;p++){
if(a[0][i]==a[j][p]){
flag2=1;
for(q=0;q<k;q++){
if(a[0][i+q]!=a[j][p+q]){
flag2=0;
break;
}
}
if(flag2)
break;
}
}
for(p=k-1;p<b[j];p++){
if(a[0][i]==a[j][p]){
flag3=1;
for(q=0;q<k;q++){
if(a[0][i+q]!=a[j][p-q]){
flag3=0;
break;
}
}
if(flag3)
break;
}
}
if(flag2==0&&flag3==0)
flag1=0;
}
if(flag1==1){
printf("YES");
return 0;
}
}
printf("NO");
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1280 KB |
Output is correct |
2 |
Correct |
0 ms |
1280 KB |
Output is correct |
3 |
Correct |
0 ms |
1280 KB |
Output is correct |
4 |
Correct |
0 ms |
1280 KB |
Output is correct |
5 |
Correct |
0 ms |
1280 KB |
Output is correct |
6 |
Correct |
0 ms |
1280 KB |
Output is correct |
7 |
Correct |
0 ms |
1280 KB |
Output is correct |
8 |
Correct |
0 ms |
1280 KB |
Output is correct |
9 |
Correct |
0 ms |
1280 KB |
Output is correct |
10 |
Correct |
0 ms |
1280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1280 KB |
Output is correct |
2 |
Correct |
0 ms |
1280 KB |
Output is correct |
3 |
Correct |
0 ms |
1280 KB |
Output is correct |
4 |
Correct |
0 ms |
1280 KB |
Output is correct |
5 |
Correct |
0 ms |
1280 KB |
Output is correct |
6 |
Correct |
0 ms |
1280 KB |
Output is correct |
7 |
Correct |
0 ms |
1280 KB |
Output is correct |
8 |
Correct |
0 ms |
1280 KB |
Output is correct |
9 |
Correct |
0 ms |
1280 KB |
Output is correct |
10 |
Correct |
0 ms |
1280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1280 KB |
Output is correct |
2 |
Correct |
0 ms |
1280 KB |
Output is correct |
3 |
Correct |
0 ms |
1280 KB |
Output is correct |
4 |
Correct |
0 ms |
1280 KB |
Output is correct |
5 |
Correct |
0 ms |
1280 KB |
Output is correct |
6 |
Correct |
0 ms |
1280 KB |
Output is correct |
7 |
Correct |
0 ms |
1280 KB |
Output is correct |
8 |
Correct |
0 ms |
1280 KB |
Output is correct |
9 |
Correct |
0 ms |
1280 KB |
Output is correct |
10 |
Correct |
8 ms |
1280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1280 KB |
Output is correct |
2 |
Correct |
0 ms |
1280 KB |
Output is correct |
3 |
Correct |
0 ms |
1280 KB |
Output is correct |
4 |
Correct |
0 ms |
1280 KB |
Output is correct |
5 |
Correct |
0 ms |
1280 KB |
Output is correct |
6 |
Correct |
0 ms |
1280 KB |
Output is correct |
7 |
Correct |
0 ms |
1280 KB |
Output is correct |
8 |
Correct |
0 ms |
1280 KB |
Output is correct |
9 |
Correct |
26 ms |
1280 KB |
Output is correct |
10 |
Correct |
24 ms |
1280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
1280 KB |
Output is correct |
2 |
Correct |
4 ms |
1280 KB |
Output is correct |
3 |
Correct |
3 ms |
1280 KB |
Output is correct |
4 |
Correct |
51 ms |
1280 KB |
Output is correct |
5 |
Correct |
3 ms |
1280 KB |
Output is correct |
6 |
Correct |
9 ms |
1280 KB |
Output is correct |
7 |
Correct |
13 ms |
1280 KB |
Output is correct |
8 |
Correct |
11 ms |
1280 KB |
Output is correct |
9 |
Correct |
17 ms |
1280 KB |
Output is correct |
10 |
Execution timed out |
1000 ms |
0 KB |
Program timed out |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
1280 KB |
Output is correct |
2 |
Correct |
30 ms |
1280 KB |
Output is correct |
3 |
Correct |
24 ms |
1280 KB |
Output is correct |
4 |
Correct |
21 ms |
1280 KB |
Output is correct |
5 |
Correct |
45 ms |
1280 KB |
Output is correct |
6 |
Correct |
57 ms |
1280 KB |
Output is correct |
7 |
Correct |
72 ms |
1280 KB |
Output is correct |
8 |
Correct |
16 ms |
1280 KB |
Output is correct |
9 |
Execution timed out |
1000 ms |
0 KB |
Program timed out |
10 |
Halted |
0 ms |
0 KB |
- |