回答編集履歴
2
修正時に間違いを入れ込んだのを修正
test
CHANGED
@@ -50,7 +50,7 @@
|
|
50
50
|
|
51
51
|
unsigned int b = (l+h)/2;
|
52
52
|
|
53
|
-
if( Sq[b] == SqRest ){ Show( a,b,c ); Show( b,a,c );
|
53
|
+
if( Sq[b] == SqRest ){ Show( a,b,c ); Show( b,a,c ); break; }
|
54
54
|
|
55
55
|
|
56
56
|
|
1
思いっきり間違っていたので修正
test
CHANGED
@@ -50,13 +50,13 @@
|
|
50
50
|
|
51
51
|
unsigned int b = (l+h)/2;
|
52
52
|
|
53
|
-
if( Sq[b] == SqRest ){ Show( a,b,c ); Show( b,a,c ); break; }
|
53
|
+
if( Sq[b] == SqRest ){ Show( a,b,c ); Show( b,a,c ); a=c; break; }
|
54
54
|
|
55
55
|
|
56
56
|
|
57
|
-
if( Sq[
|
57
|
+
if( Sq[b] < SqRest ){ l = b+1; }
|
58
58
|
|
59
|
-
else{
|
59
|
+
else { h = b-1; }
|
60
60
|
|
61
61
|
}
|
62
62
|
|