Submission #683499

# Submission time Handle Problem Language Result Execution time Memory
683499 2023-01-18T15:40:08 Z vjudge1 Mobile (BOI12_mobile) C++17
0 / 100
1000 ms 16212 KB
#include <bits/stdc++.h>
using namespace std;
    int i, j;

struct cord
{
    double x,y;
};

int main()
{
    int t, l;
    cin>> t>> l;
    double res[t], k;
    cord r[t];
    for(i=0; i<t; i++)
        cin>> r[i].x>> r[i].y;
    for(i=t-1; i>0; i--)
    {
        k=0.5*(r[i].x+r[i-1].x+(r[i].y*r[i].y-r[i-1].y*r[i-1].y)/(r[i].x-r[i-1].x));
        if(k<=l)
            break;
    }
        printf("%0.6llf", k);
}

Compilation message

mobile.cpp: In function 'int main()':
mobile.cpp:24:23: warning: use of 'll' length modifier with 'f' type character has either no effect or undefined behavior [-Wformat=]
   24 |         printf("%0.6llf", k);
      |                       ^
mobile.cpp:14:12: warning: unused variable 'res' [-Wunused-variable]
   14 |     double res[t], k;
      |            ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 296 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 312 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 420 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 424 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 64 ms 1696 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 67 ms 1684 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 58 ms 1820 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 99 ms 2092 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 100 ms 2096 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 370 ms 8352 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 544 ms 8360 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 426 ms 9920 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 651 ms 10008 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 484 ms 11596 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 775 ms 11488 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 558 ms 13056 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 831 ms 13052 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 732 ms 16212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1022 ms 15960 KB Time limit exceeded
2 Halted 0 ms 0 KB -