## Search found 7 matches

Tue Oct 14, 2003 12:12 pm
Forum: Volume 101 (10100-10199)
Topic: 10154 - Weights and Measures
Replies: 60
Views: 40301
thanks
understand now!
i think i should think of the algorithm more carefully
before i post next time
Tue Oct 14, 2003 8:38 am
Forum: Volume 101 (10100-10199)
Topic: 10154 - Weights and Measures
Replies: 60
Views: 40301

### 10154

many people said the algorithm of 10154 is LIS and my LIS program also got AC (sort the strength first and the weight secondary) but i don't think so what about this input 200 220 10 110 my AC program using algorithm LIS gave me the answer 1 but i think the correct answer should be 2 (put the first ...
Mon Oct 13, 2003 7:57 am
Forum: Volume 105 (10500-10599)
Topic: 10518 - How Many Calls?
Replies: 19
Views: 13658
it's not need to add "%10" one of my ac programs: [cpp] #include <stdio.h> long dd[1000000]; int main() { long long n; long b,m; long cases=0; while(1){ scanf("%lld%ld",&n,&b); if(!n && !b) break; cases++; dd[0]=1; dd[1]=1; for(m=2;m<1000000;m++){ dd[m]=(dd[m-1]+dd[m-2]+1)%b; if(dd[m]==1 && dd[m-1]=...
Fri Oct 10, 2003 5:54 pm
Forum: Volume 105 (10500-10599)
Topic: 10563 - Least Squares
Replies: 14
Views: 7325
Ac now :( [cpp] void search(int m,int n,int i,int j) { char c1,c2; int len,k; c1=find(n,i,j); board [j]=c1; len=0; while(++len){ if(j+len>=n || board [j+len]!='?') break; c2=find(n,i,j+len); if(c2<c1) break; if(isok(m,n,i,j,len) && (j+len+1>=n || board [j+len+1]!=c1) && (!i || board[i-1][j+len]!=c1)...
Thu Oct 09, 2003 12:12 pm
Forum: Volume 105 (10500-10599)
Topic: 10563 - Least Squares
Replies: 14
Views: 7325
My algorithm is Greedy i don't know what is wrong with it can anyone give me some datas or some hints thanks [cpp] #include <iostream.h> char board[110][110]; char find(int n,int i,int j) { char color='A'; while(1){ if((!i || board[i-1][j]!=color) && (!j || board [j-1]!=color) && (j==n-1 || board [j...
Wed Jul 30, 2003 9:19 am
Forum: Volume 105 (10500-10599)
Topic: 10537 - The Toll! Revisited
Replies: 27
Views: 10186
I get Ac now
my last program was wrong when there is just one node.
Wed Jul 30, 2003 9:13 am
Forum: Volume 105 (10500-10599)
Topic: 10537 - The Toll! Revisited
Replies: 27
Views: 10186
Help! [cpp] #include <stdio.h> // A-Z: 0-25 // a-z: 30-55 long long maxvalue; bool link[60][60]; long long cost[60]; long long v; int parent[60]; int isin[60]; int scr,tar; int convert_1(char ch) { if(ch>='a' && ch<='z') return (ch-'a'+30); return (ch-'A'); } char convert_2(int x) { if(x<30) return ...