Search found 9 matches

by bleedingeyes
Thu Oct 09, 2008 12:46 am
Forum: Volume 113 (11300-11399)
Topic: 11362 - Phone List
Replies: 19
Views: 8901

Re: 11362 - Phone List

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)==1) { for(k=...
by bleedingeyes
Thu Sep 25, 2008 4:19 am
Forum: Volume 114 (11400-11499)
Topic: 11494 - Queen
Replies: 11
Views: 5096

Re: 11494 - Queen

thanx helloneo
i forgot the case where queen can mone straight. not diagonal
i got AC now
thank you very much
by bleedingeyes
Thu Sep 25, 2008 4:06 am
Forum: Volume 114 (11400-11499)
Topic: 11491 - Erasing and Winning
Replies: 14
Views: 6248

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]) { for(k=i;k<a-1;k++) d...
by bleedingeyes
Thu Sep 25, 2008 2:23 am
Forum: Volume 114 (11400-11499)
Topic: 11494 - Queen
Replies: 11
Views: 5096

11494 - Queen

what wrong with my logic?
why WA?
please help me

Code: Select all

//got AC
by bleedingeyes
Tue Sep 23, 2008 1:42 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 33202

Re: 11219 - How old are you?

thanks . i got AC now
by bleedingeyes
Mon Sep 22, 2008 6:07 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 33202

Re: 11219 - How old are you?

i got invalid for those input
but not AC yet

Code: Select all

//got AC
by bleedingeyes
Sat Sep 20, 2008 4:58 am
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 44851

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==' ') continue; else if(ch==')') ...
by bleedingeyes
Tue Sep 16, 2008 2:56 pm
Forum: Volume 114 (11400-11499)
Topic: 11490 - Just Another Problem
Replies: 4
Views: 2588

Re: 11490 - Just Another Problem

can anyone give me some hint how to solve the problem quickly
by bleedingeyes
Tue Sep 09, 2008 9:04 am
Forum: Volume 114 (11400-11499)
Topic: 11455 - Behold my quadrangle
Replies: 21
Views: 10724

Re: 11455 - Behold My Quadrangle

andmej wrote:Input

Code: Select all

3
1 2 3 6
1 3 3 7
1 2 3 7
Output

Code: Select all

quadrangle
quadrangle
banana
can anyone explain me why 1 2 3 6 and 1 3 3 7 is not banana
is it possible to make ne quadrangle when sum of its 3 side is equal to other side?

Go to advanced search