Submission #700893

# Submission time Handle Problem Language Result Execution time Memory
700893 2023-02-19T11:02:05 Z beaconmc ICC (CEOI16_icc) C++14
Compilation error
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);
      |                                 ~~~~~^