Submission #882314

# Submission time Handle Problem Language Result Execution time Memory
882314 2023-12-03T03:52:48 Z ono_de206 ICC (CEOI16_icc) C++14
Compilation error
0 ms 0 KB
#include "icc.h"
#include <bits/stdc++.h>
using namespace std;

#include<bits/stdc++.h>
using namespace std;

#define in insert
#define all(x) x.begin(),x.end()
#define pb push_back
#define eb emplace_back
#define ff first
#define ss second

//#define int long long

typedef long long ll;
typedef vector<int> vi;
typedef set<int> si;
typedef multiset<int> msi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;

void run(int n) {
	for(int t = 1; t < n; t++) {
		bool fl = 1;
		for(int i = 1; i <= n && fl; i++) {
			for(int j = i + 1; j <= n && fl; j++) {
				if(query(1, 1, {i}, {j})) {
					setRoad(i, j);
					fl = 0;
				}
			}
		}
	}
}

Compilation message

icc.cpp: In function 'void run(int)':
icc.cpp:29:28: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   29 |     if(query(1, 1, {i}, {j})) {
      |                            ^
      |                            |
      |                            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:29:28: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   29 |     if(query(1, 1, {i}, {j})) {
      |                            ^
      |                            |
      |                            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);
      |                                 ~~~~~^