# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1107 |
2013-06-25T08:32:29 Z |
hana5505 |
백신 (KOI13_vaccine) |
C++ |
|
1000 ms |
1280 KB |
#include<stdio.h>
int n,k,mi[101];
int ar[101][1001];
int same(int s,int e)
{
int i,j,l,ll,t,tt,cnt=0;
for(i=2;i<=n;i++){
tt=0;
for(j=1;j<=mi[i]-k+1;j++){
t=1;
for(l=j,ll=s;l<j+k,ll<=e;l++,ll++)
if(ar[i][l]!=ar[1][ll]) t=0;
if(t) tt=1;
t=1;
for(l=j,ll=e;l<j+k,ll>=s;l++,ll--)
if(ar[i][l]!=ar[1][ll]) t=0;
if(t) tt=1;
}
if(tt) cnt++;
}
if(cnt==n-1) return 1;
return 0;
}
int main()
{
int i,j;
scanf("%d %d",&n,&k);
for(i=1;i<=n;i++){
scanf("%d",&mi[i]);
for(j=1;j<=mi[i];j++)
scanf("%d",&ar[i][j]);
}
for(i=1;i<=mi[1]-k+1;i++){
if(same(i,i+k-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 |
1 ms |
1280 KB |
Output is correct |
5 |
Correct |
0 ms |
1280 KB |
Output is correct |
6 |
Correct |
1 ms |
1280 KB |
Output is correct |
7 |
Correct |
1 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 |
32 ms |
1280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1280 KB |
Output is correct |
2 |
Correct |
29 ms |
1280 KB |
Output is correct |
3 |
Correct |
40 ms |
1280 KB |
Output is correct |
4 |
Correct |
10 ms |
1280 KB |
Output is correct |
5 |
Correct |
23 ms |
1280 KB |
Output is correct |
6 |
Correct |
50 ms |
1280 KB |
Output is correct |
7 |
Correct |
49 ms |
1280 KB |
Output is correct |
8 |
Correct |
0 ms |
1280 KB |
Output is correct |
9 |
Correct |
74 ms |
1280 KB |
Output is correct |
10 |
Correct |
67 ms |
1280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
290 ms |
1280 KB |
Output is correct |
2 |
Correct |
315 ms |
1280 KB |
Output is correct |
3 |
Correct |
36 ms |
1280 KB |
Output is correct |
4 |
Execution timed out |
1000 ms |
0 KB |
Program timed out |
5 |
Halted |
0 ms |
0 KB |
- |
6 |
Halted |
0 ms |
0 KB |
- |
7 |
Halted |
0 ms |
0 KB |
- |
8 |
Halted |
0 ms |
0 KB |
- |
9 |
Halted |
0 ms |
0 KB |
- |
10 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
878 ms |
1280 KB |
Output is correct |
2 |
Execution timed out |
1000 ms |
0 KB |
Program timed out |
3 |
Halted |
0 ms |
0 KB |
- |
4 |
Halted |
0 ms |
0 KB |
- |
5 |
Halted |
0 ms |
0 KB |
- |
6 |
Halted |
0 ms |
0 KB |
- |
7 |
Halted |
0 ms |
0 KB |
- |
8 |
Halted |
0 ms |
0 KB |
- |
9 |
Halted |
0 ms |
0 KB |
- |
10 |
Halted |
0 ms |
0 KB |
- |