제출 #875250

#제출 시각아이디문제언어결과실행 시간메모리
875250Ahmed57Nicelines (RMI20_nicelines)C++17
0 / 100
28 ms440 KiB
#include <bits/stdc++.h> #include "nice_lines.h" using namespace std; void solve(int subtaskid,int N){ int x = 0; double l = -1000000000.0 , r = 1000000000.0; for(int x = 0;x<1000;x++){ double f1 = l+(r-l)/3 , f2 = r-(r-l)/3; if(query(0,f1)<=query(0,f2)){ r = f2; }else l = f1; } double y1 = l; l = -1000000000.0 , r = 1000000000.0; for(int x = 0;x<1000;x++){ double f1 = l+(r-l)/3 , f2 = r-(r-l)/3; if(query(1,f1)<=query(1,f2)){ r = f2; }else l = f1; } double y2 = l; double m = (y2-y1); the_lines_are({m},{y1}); }

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

nicelines.cpp: In function 'void solve(int, int)':
nicelines.cpp:24:20: warning: narrowing conversion of 'm' from 'double' to 'int' [-Wnarrowing]
   24 |     the_lines_are({m},{y1});
      |                    ^
nicelines.cpp:24:20: warning: narrowing conversion of 'm' from 'double' to 'int' [-Wnarrowing]
nicelines.cpp:24:24: warning: narrowing conversion of 'y1' from 'double' to 'int' [-Wnarrowing]
   24 |     the_lines_are({m},{y1});
      |                        ^~
nicelines.cpp:24:24: warning: narrowing conversion of 'y1' from 'double' to 'int' [-Wnarrowing]
nicelines.cpp:6:9: warning: unused variable 'x' [-Wunused-variable]
    6 |     int x = 0;
      |         ^
#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...