QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#629412#9168. Square Locatorchie4WA 0ms3688kbC++14532b2024-10-11 11:19:272024-10-11 11:19:31

Judging History

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

  • [2024-10-11 11:19:31]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3688kb
  • [2024-10-11 11:19:27]
  • 提交

answer

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

long long acb(long long c, long long b) { return sqrtl(c - b); }

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

    oa = sqrt(oa);
    long long cx, cy, bx, dx;
    cx = std::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: 3624kb

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: 3688kb

input:

1 1 1 1

output:

1 0 1 0 1 0 1

result:

ok Answer is correct

Test #3:

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

input:

1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000

output:

1000000000 0 1000000000 0 1000000000 0 1000000000

result:

ok Answer is correct

Test #4:

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

input:

4 10 8 2

output:

2 1 3 2 2 1 1

result:

ok Answer is correct

Test #5:

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

input:

4 50 104 58

output:

2 5 5 2 10 -3 7

result:

ok Answer is correct

Test #6:

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

input:

9 16 65 58

output:

3 4 0 7 4 3 7

result:

ok Answer is correct

Test #7:

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

input:

25 13 101 113

output:

5 3 2 10 1 7 8

result:

wrong answer Not a square