제출 #645189

#제출 시각아이디문제언어결과실행 시간메모리
645189TimDeeNicelines (RMI20_nicelines)C++17
컴파일 에러
0 ms0 KiB
#include "nice_lines.h" #include <bits/stdc++.h> using namespace std; #define ld long double int n; void p1() { int l=-1e4, r=1e4; while (l<r) { int mid=(l+r+1)>>1; ld x=query(0,mid-1); ld y=query(0,mid); ld z=query(0,mid+1); if (x>=y && y<=z) { r=mid; break; } if (x<=y && y<=z) r=mid-1; else l=mid; } int b=r; l=-1e4, r=1e4; while (l<r) { int mid=(l+r+1)>>1; ld x=query(mid-1,0); ld y=query(mid,0); ld z=query(mid+1,0); if (x>=y && y<=z) { r=mid; break; } if (x<=y && y<=z) r=mid-1; else l=mid; } ld x=query(0,b), y=query(1,b); assert(x==0); if (x==y) { the_lines_are({0},{b}); return; } int a; if (r) { assert(b!=0); a=-b/r; exit(1); } else { if (query(1,1)==0) a=1; else if (query(1,-1)==0) a=-1; else a=0; } the_lines_are({a},{b}); }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/cc3E1eKT.o: in function `main':
grader.cpp:(.text.startup+0x68): undefined reference to `solve(int, int)'
collect2: error: ld returned 1 exit status