Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
find differences
#3
str s="r1bqkb1r/pppp1ppp/2n2n2/4p3/4P3/3P4/PPPN1PPP/R1BQKBNR w KQkq -"


how to get t[0]="r1bqkb1r"
t|1]="pppp1ppp"
t[2]="2n2n2"
---
t[7]="R1BQKBNR"

?


then i want to create an array called d with d[0] --- d[7] lists such that:

for i 0 7

,for j 0 t[i].len (maybe not t[i].len !!)

,,if t[i][j] is a min (small) character, then augment d[i] with the position of t[i][j] in t[i] when we understand t[i] like a string with 8 character ( for example understand t[0] as r0bqkb0r and t[2] as 00n00n00 ...)


so i want to get : d[0]="0,2,3,4,5,7" d[1]="0,1,2,3,5,6,7" d[2]="2,5" ...





if you can do this, my code will be faster than previous you gave me...

Thanks!!


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)