用户输出
-456 -278
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#25316 | #1138. ddd和鹦鹉 | Wrong Answer | 0 | 24 ms | 380 K | C / 1.1 K | 呵呵 | 2020-04-25 18:40:31 |
#include <stdio.h>
#include <math.h>
float fun(int a, int b, int c, int d, int e, int f, int k, int z);
int main() {
int a, b, c, d, e, f;
scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
int x, y, k, z;
float l, j;
l = (3 * a + e + 2 * c) / 6;
j = (3 * b + f + 2 * d) / 6;
x = (int)l;
y = (int)j;
// printf("%d %d", x, y);
k = x + 1;
z = y + 1;
float s1, s2, s3, s4;
s1 = fun(a, b, c, d, e, f, x, y);
s2 = fun(a, b, c, d, e, f, k, y);
s3 = fun(a, b, c, d, e, f, x, z);
s4 = fun(a, b, c, d, e, f, k, z);
// printf("%d %d %d %d", s1, s2, s3, s4);
if (s1 <= s2 && s1 <= s3 && s1 <= s4) {
printf("%d %d", x, y);
}
if (s2 <= s1 && s2 <= s3 && s2 <= s4) {
printf("%d %d", k, y);
}
if (s3 <= s2 && s3 <= s1 && s3 <= s4) {
printf("%d %d", x, z);
}
if (s4 <= s2 && s4 <= s3 && s4 <= s1) {
printf("%d %d", k, z);
}
return 0;
}
float fun(int a, int b, int c, int d, int e, int f, int k, int z) {
float s;
s = sqrt(3 * ((k - a) * (k - a)) + 3 * ((z - b) * (z - b))) +
sqrt(2 * ((k - c) * (k - c)) + 2 * ((z - d) * (z - d))) + sqrt((k - e) * (k - e) + (z - f) * (z - f));
return s;
}
用户输出
-456 -278
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
407 640
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
131 395
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
-395 30
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
206 362
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
287 -74
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
428 -74
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
192 -357
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
-191 -252
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0