Search found 2 matches
- Tue Jul 04, 2006 2:42 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10679 - I Love Strings!!
- Replies: 101
- Views: 69598
10679 why TLE?
//TLE
#include<stdio.h>
#include<string.h>
char S[100050],T[1050],*p,c;
long q,k,i,j;
void main()
{
//what is the problem
scanf("%ld",&k);//test case=k
for(i=0;i<k;i++)
{
scanf(" %s",S);
scanf(" %ld",&q);
for(j = 0;j<q;j++)
{
scanf(" %s",T);
p = strstr(S,T);
if(p)
printf("y\n ...
- Tue Jul 04, 2006 2:40 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 110976
101 why TLE ?
#include<stdio.h>
#include<string.h>
#define INF 29
long point[30],prev[30],next[30],last[30],stk[30],n;
void toinitials(long a)
{
long x;
while(next[a] != INF)
{
x = next[a];
point[x] = x;
prev[x] = INF;
last[x] = x;
stk[x] = x;
next[a] = INF;
a = x;
}
}
void renew(long x,long y ...