제출 #777920

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7779202023-07-09 22:39:34saidAliens (IOI16_aliens)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#define N 100010
#define INF 1e18
#define SQ(x) ((x)*(x))
int qtd[N]; // Quantidade de retangulos usados pela PD
long long dp[N]; // PD
// Definindo a estrutura Ponto
#define X first
#define Y second
typedef pair<long long, long long> Ponto;
vector<Ponto> pts;
int solve(int n, long long C)
{
// Casos bases da PD
dp[0] = 0; qtd[0] = 0;
// Execucao da PD
for (int i = 1; i <= n; i++)
{
dp[i] = INF;
for (int w = 1; w <= i; w++)
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

aliens.cpp: In function 'long long int take_photos(int, int, int, int*, int*)':
aliens.cpp:80:16: error: cannot convert 'std::vector<std::pair<long long int, long long int> >' to 'long long int'
   80 |   if (solve(n, pts, mei) <= k)
      |                ^~~
      |                |
      |                std::vector<std::pair<long long int, long long int> >
aliens.cpp:19:28: note:   initializing argument 2 of 'int solve(int, long long int)'
   19 | int solve(int n, long long C)
      |                  ~~~~~~~~~~^
aliens.cpp:86:11: error: cannot convert 'std::vector<std::pair<long long int, long long int> >' to 'long long int'
   86 |  solve(n, pts, ini);
      |           ^~~
      |           |
      |           std::vector<std::pair<long long int, long long int> >
aliens.cpp:19:28: note:   initializing argument 2 of 'int solve(int, long long int)'
   19 | int solve(int n, long long C)
      |                  ~~~~~~~~~~^