Submission #597253

#TimeUsernameProblemLanguageResultExecution timeMemory
597253ThegeekKnight16Nicelines (RMI20_nicelines)C++17
0 / 100
1 ms336 KiB
#include <bits/stdc++.h> #include <nice_lines.h> using namespace std; typedef long double dd; void solve(int subtask_id, int N) { if (N == 1) { dd D = query(0.0, 0.0); int a, b; if (D == 0.0) { b = 0.0; int ini = -1e4 - 10; int fim = 1e4 + 10; while (ini < fim) { int m1 = ((fim - ini) / 3); int m2 = 2*m1; m1 += ini; m2 += ini; if (fim - ini <= 2) { m1 = ini+1; m2 = fim-1; } dd d1 = query((long double)1.0, (long double)m1); dd d2 = query((long double)1.0, (long double)m2); if (d1 == 0.0) { vector<int> respA, respB; respA.push_back(m1); respB.push_back(b); the_lines_are(respA, respB); } else if (d2 == 0.0) { vector<int> respA, respB; respA.push_back(m2); respB.push_back(b); the_lines_are(respA, respB); } if (d1 <= d2) fim = m2; else if (d2 < d1) ini = m1; } vector<int> respA, respB; respA.push_back(ini); respB.push_back(b); the_lines_are(respA, respB); } else { vector<int> v; v[-1] = 0; } } else { return; } } /*int main() { }*/

Compilation message (stderr)

nicelines.cpp: In function 'void solve(int, int)':
nicelines.cpp:11:13: warning: unused variable 'a' [-Wunused-variable]
   11 |         int a, b;
      |             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...