Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Code jam japan2011 練習問題A

979 views

Published on

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Code jam japan2011 練習問題A

  1. 1. Code Jam Japan 2011練習問題A: 数珠繋ぎ @Kshi_Kshi
  2. 2. 初期 off E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  3. 3. 1回目 on off E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  4. 4. 2回目 off on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  5. 5. 3回目 on on off E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  6. 6. 4回目 off off on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  7. 7. 5回目 on off on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  8. 8. 6回目 off on on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  9. 9. 7回目 on on on off E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  10. 10. 8回目 off off off on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  11. 11. 9回目 on off off on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  12. 12. 10回目 off on off on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  13. 13. 11回目 on on off on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  14. 14. 12回目 off off on on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  15. 15. 13回目 on off on on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  16. 16. 14回目 off on on on E:enable, S:on E:enable, S:off E:disable, S:on E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  17. 17. 15回目 on on on on E:enable, S:on E:enable, S:off E:disable, S:on off E:disable, S:off E(Electronic): enable / disable S(Switch): on / off
  18. 18. N = 4の場合
  19. 19. 初期 off E:enable, S:on E:enable, S:off 電球 E:disable, S:on E:disable, S:off 電 電 球 L: Off 球 L: OnE(Electronic): enable / disableS(Switch): on / offL(lamp): on / off
  20. 20. 1回目 on off E:enable, S:on E:enable, S:off 電球 E:disable, S:on E:disable, S:off 電 電 球 L: Off 球 L: OnE(Electronic): enable / disableS(Switch): on / offL(lamp): on / off
  21. 21. 2回目 off on E:enable, S:on E:enable, S:off 電球 E:disable, S:on E:disable, S:off 電 電 球 L: Off 球 L: OnE(Electronic): enable / disableS(Switch): on / offL(lamp): on / off
  22. 22. 3回目 on on off E:enable, S:on E:enable, S:off 電球 E:disable, S:on E:disable, S:off 電 電 球 L: Off 球 L: OnE(Electronic): enable / disableS(Switch): on / offL(lamp): on / off
  23. 23. 4回目 off off on E:enable, S:on E:enable, S:off 電球 E:disable, S:on E:disable, S:off 電 電 球 L: Off 球 L: OnE(Electronic): enable / disableS(Switch): on / offL(lamp): on / off
  24. 24. 5回目 on off on E:enable, S:on E:enable, S:off 電球 E:disable, S:on E:disable, S:off 電 電 球 L: Off 球 L: OnE(Electronic): enable / disableS(Switch): on / offL(lamp): on / off
  25. 25. 6回目 off on on E:enable, S:on E:enable, S:off 電球 E:disable, S:on E:disable, S:off 電 電 球 L: Off 球 L: OnE(Electronic): enable / disableS(Switch): on / offL(lamp): on / off
  26. 26. 7回目 on on on E:enable, S:on E:enable, S:off 電球 E:disable, S:on E:disable, S:off 電 電 球 L: Off 球 L: OnE(Electronic): enable / disableS(Switch): on / offL(lamp): on / off
  27. 27. 8回目(=初期) off 周期は8. E:enable, S:on E:enable, S:off 電球 E:disable, S:on E:disable, S:off 電 電 球 L: Off 球 L: OnE(Electronic): enable / disableS(Switch): on / offL(lamp): on / off

×