mirror of
https://github.com/xlucn/PAT.git
synced 2026-10-03 00:23:15 +08:00
minor changes
This commit is contained in:
+4
-11
@@ -56,7 +56,6 @@
|
||||
**/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#define SQR(X) ((X)*(X))
|
||||
#define R(COLOR) ((COLOR & 0XFF0000) >> 16)
|
||||
@@ -85,9 +84,7 @@ int main()
|
||||
|
||||
int count = 0, M0, N0;
|
||||
for(int i = 0; i < N; i ++)
|
||||
{
|
||||
for (int j = 0; j < M; j++)
|
||||
{
|
||||
if((i == 0 ? 1 : D(fig[i][j], fig[i - 1][j - 1]) > SQR(TOL))
|
||||
&& (i == 0 ? 1 : D(fig[i][j], fig[i - 1][j ]) > SQR(TOL))
|
||||
&& (i == 0 ? 1 : D(fig[i][j], fig[i - 1][j + 1]) > SQR(TOL))
|
||||
@@ -102,14 +99,10 @@ int main()
|
||||
N0 = i;
|
||||
M0 = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count == 0)
|
||||
puts("Not Exist");
|
||||
else if(count == 1)
|
||||
printf("(%d, %d): %d", M0 + 1, N0 + 1, fig[N0][M0]);
|
||||
else
|
||||
puts("Not Unique");
|
||||
|
||||
if(count == 0) printf("Not Exist");
|
||||
if(count == 1) printf("(%d, %d): %d", M0 + 1, N0 + 1, fig[N0][M0]);
|
||||
if(count >= 2) printf("Not Unique");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ int main()
|
||||
for(i = 0; i < 10001; i++) /* find the shortest, special case */
|
||||
if(l[i]) {length = i; break;}
|
||||
|
||||
for(i = 0; i < 10001; i++) /* make new ropes */
|
||||
for(; i < 10001; i++) /* make new ropes */
|
||||
while(l[i]--) length = (length + i) / 2;
|
||||
|
||||
printf("%d", (int)length);
|
||||
|
||||
Reference in New Issue
Block a user