由於只有 4 個開關 最終只有 2^4=16 種可能性 以此方法進行暴破
要特別注意輸出時要排序!
USER: Lee Pu [leepupu1]
TASK: lamps
LANG: C++
Compiling...
Compile: OK
Executing...
Test 1: TEST OK [0.000 secs, 3352 KB]
Test 2: TEST OK [0.000 secs, 3352 KB]
Test 3: TEST OK [0.000 secs, 3352 KB]
Test 4: TEST OK [0.000 secs, 3352 KB]
Test 5: TEST OK [0.000 secs, 3352 KB]
Test 6: TEST OK [0.000 secs, 3352 KB]
Test 7: TEST OK [0.000 secs, 3352 KB]
Test 8: TEST OK [0.000 secs, 3352 KB]
All tests OK.
Your program ('lamps') produced all correct answers! This is your
submission #5 for this problem. Congratulations!
Here are the test data inputs:------- test 1 ---- 10 0 -1 -1 ------- test 2 ---- 10 0 -1 1 -1 ------- test 3 ---- 20 3 -1 1 3 5 -1 ------- test 4 ---- 50 100 1 -1 -1 ------- test 5 ---- 75 250 -1 -1 ------- test 6 ---- 100 8394 1 7 13 19 25 31 37 43 49 55 -1 64 -1 ------- test 7 ---- 100 2000 31 86 23 -1 42 -1 ------- test 8 ---- 100 8950 -1 -1Keep up the good work!
The Code
沒有留言:
張貼留言