답안 #700893

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
700893 2023-02-19T11:02:05 Z beaconmc CEOI16_icc (CEOI16_icc) C++14
컴파일 오류
0 ms 0 KB
#include "icc.h"
#include <bits/stdc++.h>


typedef int ll;
using namespace std;


#define FOR(i, x, y) for(ll i=x; i<y; i++)
#define FORNEG(i, x, y) for(ll i=x; i>y; i--)
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)


void run(int N){
	FOR(i,0,N-1){
		bool flag = false;

		FOR(k,0,N){
			FOR(p,k+1,N){
				ll sus = query(1, 1, {k+1}, {p+1});
				if (sus==1) flag=true,setRoad(k+1, p+1);
				if (flag) break;
			}
			if (flag) break;
		}
	}
}

Compilation message

icc.cpp: In function 'void run(int)':
icc.cpp:20:38: error: invalid conversion from 'll' {aka 'int'} to 'int*' [-fpermissive]
   20 |     ll sus = query(1, 1, {k+1}, {p+1});
      |                                      ^
      |                                      |
      |                                      ll {aka int}
In file included from icc.cpp:1:
icc.h:10:30: note:   initializing argument 3 of 'int query(int, int, int*, int*)'
   10 | int query(int a, int b, int *A, int *B);
      |                         ~~~~~^
icc.cpp:20:38: error: invalid conversion from 'll' {aka 'int'} to 'int*' [-fpermissive]
   20 |     ll sus = query(1, 1, {k+1}, {p+1});
      |                                      ^
      |                                      |
      |                                      ll {aka int}
In file included from icc.cpp:1:
icc.h:10:38: note:   initializing argument 4 of 'int query(int, int, int*, int*)'
   10 | int query(int a, int b, int *A, int *B);
      |                                 ~~~~~^