why i am getting TLE
please help
#include<stdio.h>
#include<algorithm>
using namespace std;
struct tag
{
char data[15];
int len;
}num[10050];
bool cmp(const tag &p,const tag &q)
{
return p.len<q.len;
}
int main()
{
int a,b,i,j,k,flag;
// freopen("in.txt","r",stdin);
while(scanf("%d",&a ...
Search found 9 matches
- Thu Oct 09, 2008 12:46 am
- Forum: Volume 113 (11300-11399)
- Topic: 11362 - Phone List
- Replies: 19
- Views: 13344
- Thu Sep 25, 2008 4:19 am
- Forum: Volume 114 (11400-11499)
- Topic: 11494 - Queen
- Replies: 11
- Views: 7607
Re: 11494 - Queen
thanx helloneo
i forgot the case where queen can mone straight. not diagonal
i got AC now
thank you very much
i forgot the case where queen can mone straight. not diagonal
i got AC now
thank you very much
- Thu Sep 25, 2008 4:06 am
- Forum: Volume 114 (11400-11499)
- Topic: 11491 - Erasing and Winning
- Replies: 14
- Views: 8432
11491 - Erasing and Winning -TLE
please help
got TLE
#include<stdio.h>
int main()
{
long a,b,i,j,k;
char data[1000000];
// freopen("in.txt","r",stdin);
while(scanf("%ld %ld%*c",&a,&b)==2)
{
if(a==0 && b==0)
break;
scanf("%s",&data);
for(i=0;i<a;i++)
{
if(!b) break;
for(j=i+1;j<i+1+1;j++)
{
if(data[i]<data[j ...
got TLE
#include<stdio.h>
int main()
{
long a,b,i,j,k;
char data[1000000];
// freopen("in.txt","r",stdin);
while(scanf("%ld %ld%*c",&a,&b)==2)
{
if(a==0 && b==0)
break;
scanf("%s",&data);
for(i=0;i<a;i++)
{
if(!b) break;
for(j=i+1;j<i+1+1;j++)
{
if(data[i]<data[j ...
- Thu Sep 25, 2008 2:23 am
- Forum: Volume 114 (11400-11499)
- Topic: 11494 - Queen
- Replies: 11
- Views: 7607
- Tue Sep 23, 2008 1:42 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11219 - How old are you?
- Replies: 117
- Views: 49577
Re: 11219 - How old are you?
thanks . i got AC now
- Mon Sep 22, 2008 6:07 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11219 - How old are you?
- Replies: 117
- Views: 49577
Re: 11219 - How old are you?
i got invalid for those input
but not AC yet
but not AC yet
Code: Select all
//got AC
- Sat Sep 20, 2008 4:58 am
- Forum: Volume 6 (600-699)
- Topic: 673 - Parentheses Balance
- Replies: 243
- Views: 79453
Parentheses Balance WA
why WA
please help
here is my code
#include<stdio.h>
int main()
{
int a,i,j,flag,t;
char arr[150];
char ch;
freopen("in.txt","r",stdin);
while(scanf("%d%*c",&a)==1)
{
for(i=0;i<a;i++)
{
t=0;
j=0;
flag=0;
while(1)
{
scanf("%c",&ch);
if(ch=='\n')
{
break;
}
else if(ch ...
please help
here is my code
#include<stdio.h>
int main()
{
int a,i,j,flag,t;
char arr[150];
char ch;
freopen("in.txt","r",stdin);
while(scanf("%d%*c",&a)==1)
{
for(i=0;i<a;i++)
{
t=0;
j=0;
flag=0;
while(1)
{
scanf("%c",&ch);
if(ch=='\n')
{
break;
}
else if(ch ...
- Tue Sep 16, 2008 2:56 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11490 - Just Another Problem
- Replies: 4
- Views: 3420
Re: 11490 - Just Another Problem
can anyone give me some hint how to solve the problem quickly
- Tue Sep 09, 2008 9:04 am
- Forum: Volume 114 (11400-11499)
- Topic: 11455 - Behold my quadrangle
- Replies: 21
- Views: 25105
Re: 11455 - Behold My Quadrangle
can anyone explain me why 1 2 3 6 and 1 3 3 7 is not bananaandmej wrote:InputOutputCode: Select all
3 1 2 3 6 1 3 3 7 1 2 3 7
Code: Select all
quadrangle quadrangle banana
is it possible to make ne quadrangle when sum of its 3 side is equal to other side?