Search found 28 matches

Tue Mar 24, 2009 11:27 am
Forum: Volume 115 (11500-11599)
Topic: 11533 - Special Number
Replies: 8
Views: 3637

Re: 11533 - Special Number

How to print "No solution".

printf("No solution\n");

or

printf("Case %d: No solution\n",id);
printf("Case %d:No solution\n",id);
Thu Dec 13, 2007 2:59 pm
Forum: Algorithms
Topic: The longest Weak repeated substring problem
Replies: 1
Views: 1618

The longest Weak repeated substring problem

Suppose S is a string S[1....n], we call a substring P of S weak repeated,if
P=s[i...j] satisfied : there exists another subtring T=s[k...l], T equals to P, and i != k.
can someone give me an answer
Sun Dec 02, 2007 12:21 pm
Forum: Volume 100 (10000-10099)
Topic: 10080 - Gopher II
Replies: 31
Views: 15655
wa... Could somebody give me some advice ... /////////////////////////////// #include<stdio.h> #include<math.h> #define eps 1e-10 #define N 220 int n,m,s,v; struct Tnode{ double x; double y; }; Tnode a[N]; Tnode b[N]; int src,tar; int c[N][N]; int r[N][N]; int f[N][N]; int e[N]; int h[N]; double dis...
Tue Nov 06, 2007 7:53 am
Forum: C++
Topic: Runtimeerror in STL sort
Replies: 3
Views: 2709
Thank you ,sir ,I got accept when I change the com() function: ///////////////////////////////////////////////////////////// #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; #define N 150 int n; char a[N][N]; int b[N]; bool com(int x, int y){ return strc...
Tue Nov 06, 2007 4:12 am
Forum: C++
Topic: Runtimeerror in STL sort
Replies: 3
Views: 2709

Runtimeerror in STL sort

//when I use STL sort in my code ,I always get RunTime error, but when I write a sort myself , i immediate get AC. Could anybody give me an answer?? it is in the solve function below. #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; #define N 150 int n; ...
Mon Sep 24, 2007 7:39 pm
Forum: Bugs and suggestions
Topic: time limitation
Replies: 1
Views: 1959

time limitation

Problem 10290 && problem 10400, the time limitation will exceed 3s ,so the server should adjust them. 3X.
Wed Sep 12, 2007 4:58 pm
Forum: Bugs and suggestions
Topic: 10290
Replies: 1
Views: 1898

10290

the problem said the time limit is 100s, but why i got a TLE in 3s.
and a old AC code, i resubmit to the new judge and get a TLE .
Wed Sep 12, 2007 4:55 pm
Forum: Bugs and suggestions
Replies: 5
Views: 2843
very slow....
some suggestion: first ,the problems list i have solved.
second, the problems list i have tried but not solved.
all the above is displayed in the old judge ,but the new judge do not have .
Wed Sep 12, 2007 4:32 pm
Forum: Volume 102 (10200-10299)
Topic: 10290 - {Sum+=i++} to Reach N
Replies: 27
Views: 12608
I submit a code which got AC before, and now get a TLE...
I am sure that there are some mistake in the judge.
Tue Sep 11, 2007 8:57 am
Forum: Volume 101 (10100-10199)
Topic: 10126 - Zipf's Law
Replies: 36
Views: 8659
solved.thank you.when i didnot include the <string> library,the compiler didnot give any warning...,so i submit a wrong code.
Mon Sep 10, 2007 1:40 pm
Forum: Volume 102 (10200-10299)
Topic: 10290 - {Sum+=i++} to Reach N
Replies: 27
Views: 12608
another code got AC over 3000ms... I got TLE in 3000ms.

20 5520422 Andrzej Kukier 3455 2004 C++ 2007-04-20 23:08:32
Mon Sep 10, 2007 11:20 am
Forum: Volume 102 (10200-10299)
Topic: 10290 - {Sum+=i++} to Reach N
Replies: 27
Views: 12608
it states in the problem ,that the running time will be 100seconds,but why i run only 3seconds ,and get a TLE??

10290

Time Limit: 100 seconds

Memory Limit: 32 MB

5909689 {Sum+=i++} to Reach N Time limit exceeded C++ 3000 2007-09-10 09:13:21
Thu Sep 06, 2007 6:55 pm
Forum: Volume 101 (10100-10199)
Topic: 10126 - Zipf's Law
Replies: 36
Views: 8659
ayon wrote:most probably online-judge doesn't support clear()
could somebody give a specification on the environment of online-judge?
Thu Sep 06, 2007 2:59 pm
Forum: Volume 101 (10100-10199)
Topic: 10126 - Zipf's Law
Replies: 36
Views: 8659

compiler error....

hi,all. my code run well on my machine. my C++ environment is Dev-C++.but I do konw where is my fault. #include<cstdio> #include<cstring> #include<iostream> #include<map> using namespace std; int n; map<string ,int> dict; int main(){ // freopen("10126.txt","r+",stdin); string str; map<string ,int>::...
Tue Sep 04, 2007 6:38 am
Forum: Volume 112 (11200-11299)
Topic: 11264 - Coin Collector
Replies: 14
Views: 5341
could anybody give me some hints?