QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#597444#9168. Square Locatorchie4#WA 0ms3684kbC++23494b2024-09-28 17:50:122024-09-28 17:50:15

Judging History

你现在查看的是最新测评结果

  • [2024-09-28 17:50:15]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3684kb
  • [2024-09-28 17:50:12]
  • 提交

answer

#include <cmath>
#include <cstdlib>
#include <iostream>

int acb(int c, int b) { return sqrt(c - b); }

int main() {
    int oa, ob, oc, od;
    std::cin >> oa >> ob >> oc >> od;

    oa = sqrt(oa);
    int cx, cy, bx, dx;
    cx = abs((ob - od) / (2 * oa));
    cy = acb(oc, cx * cx);
    bx = (oa - cy - cx) / -2;
    dx = cx - bx;
    std::cout << oa << " " << bx << " " << acb(ob, bx * bx) << " " << cx << " "
              << cy << " " << dx << " " << acb(od, dx * dx);
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3664kb

input:

36 5 10 41

output:

6 -1 2 3 1 4 5

result:

ok Answer is correct

Test #2:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

1 1 1 1

output:

1 0 1 0 1 0 1

result:

ok Answer is correct

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3684kb

input:

1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000

output:

46340 1073718654 -2147483648 0 -2147483648 -1073718654 -2147483648

result:

wrong answer Integer parameter [name=B_x] equals to 1073718654, violates the range [-10^9, 10^9]