How to print "No solution".
printf("No solution\n");
or
printf("Case %d: No solution\n",id);
printf("Case %d:No solution\n",id);
Search found 28 matches
- Tue Mar 24, 2009 11:27 am
- Forum: Volume 115 (11500-11599)
- Topic: 11533 - Special Number
- Replies: 8
- Views: 4611
- Thu Dec 13, 2007 2:59 pm
- Forum: Algorithms
- Topic: The longest Weak repeated substring problem
- Replies: 1
- Views: 1959
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
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: 26543
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: 3400
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: 3400
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: 2306
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: 2190
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 .
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
- Topic: About the new server
- Replies: 5
- Views: 3471
- Wed Sep 12, 2007 4:32 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10290 - {Sum+=i++} to Reach N
- Replies: 27
- Views: 14906
- Tue Sep 11, 2007 8:57 am
- Forum: Volume 101 (10100-10199)
- Topic: 10126 - Zipf's Law
- Replies: 36
- Views: 12493
- Mon Sep 10, 2007 1:40 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10290 - {Sum+=i++} to Reach N
- Replies: 27
- Views: 14906
- Mon Sep 10, 2007 11:20 am
- Forum: Volume 102 (10200-10299)
- Topic: 10290 - {Sum+=i++} to Reach N
- Replies: 27
- Views: 14906
- Thu Sep 06, 2007 6:55 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10126 - Zipf's Law
- Replies: 36
- Views: 12493
- Thu Sep 06, 2007 2:59 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10126 - Zipf's Law
- Replies: 36
- Views: 12493
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...
- Tue Sep 04, 2007 6:38 am
- Forum: Volume 112 (11200-11299)
- Topic: 11264 - Coin Collector
- Replies: 14
- Views: 7412