ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¦p¦ó±N°}¦C¤¤¤¸¯À±N¨ä¤j¤p§Ç¸¹¼g¤J²Ä¤Gºû¤¤?[¤w¸Ñ¨M]

[µo°Ý] ½Ð°Ý¦p¦ó±N°}¦C¤¤¤¸¯À±N¨ä¤j¤p§Ç¸¹¼g¤J²Ä¤Gºû¤¤?[¤w¸Ñ¨M]

¥»©«³Ì«á¥Ñ asus103 ©ó 2011-1-8 06:26 ½s¿è

¦U¦ì¤j¤j¡G
¦pÃD
§Ú·Q±N°}¦C¤¤¤¸¯À±N¨ä¤j¤p¶¶§Ç¤§§Ç¸¹¼g¤J²Ä¤Gºû¤¤?
¸Ó¦p¦ó¼g?
ASUS

¦^´_ 1# asus103
  1. Sub getarray()
  2. Dim ar(10, 10)
  3. For i = 0 To 9
  4. Randomize
  5.   ar(i, 0) = Rnd 'µ¹²Ä¤@ºû¤¸¯À½á­È
  6. Next
  7. For i = 0 To 9
  8. s = Application.Match(Application.Large(Application.Index(ar, , 1), i + 1), Application.Index(ar, , 1), 0) - 1 '­pºâ²Äi+1¤jªº­È¦b²Ä¤@ºûªº¦ì¸m
  9. ar(s, 1) = i + 1 ''µ¹²Ä¤@ºû¤¸¯À½á­È
  10. Next
  11. [A1].Resize(10, 2) = ar
  12. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ asus103 ©ó 2011-1-8 06:31 ½s¿è

¦^´_ 2# Hsieh
·PÁÂHsieh¤j¤j
±z¼gªº¨Ò¤l´N¬O§Ú¥¿·Q­nªº

·Q¦A½Ð±Ð±z
¦p¦¹¨ú¶Ã¼Æ¦³¥i¯à­«½Æ¶Ü(¹w­p»Ý­n1500­Ó)?
¦pªG­nÁקK¶Ã¼Æ­È¬Û¦P¡A¸Ó¦p¦óÀËÅç»P³B²z
ÁÂÁ±z
ASUS

TOP

¦^´_ 3# asus103
·|­«½Æ¡A¸Õ¸Õ¬Ý
  1. Sub getarray()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. Dim ar(1500, 1500)
  4. Do Until d.Count = 1500
  5. Randomize
  6. x = Rnd
  7. If d.exists(x) = False Then d.Add x, i: ar(i, 0) = x: i = i + 1 'µ¹²Ä¤@ºû¤¸¯À½á­È
  8. Loop
  9. ay = Application.Index(ar, , 1)
  10. For i = 0 To 1499
  11. x = Application.Large(ay, i + 1)
  12.   s = Application.Match(x, ay, 0) - 1
  13.   ar(s, 1) = i + 1
  14. Next
  15. [A1].Resize(1500, 2) = ar
  16. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh

§Q¥ÎDictionary¨ÓÀˬd­«½Æ¡A³o¯u¬O°ª©Û
·PÁ±z
ASUS

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD