답안 #1084956

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1084956 2024-09-07T09:04:29 Z browntoad CEOI16_icc (CEOI16_icc) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "icc.h"
using namespace std;
#define ll long long
// #define int ll
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, n+1)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define RREP1(i, n) for (int i = (n); i >= 1; i--)
#define pii pair<int, int>
#define ppi pair<pii, int>
#define pip pair<int, pii>
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) (int)((x).size())
#define f first
#define s second
#define pb push_back
#define endl '\n'
#define IOS() ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)

const ll maxn = 105;
const ll mod = 1e9+7;
const ll inf = 1ll<<60;

ll mpw(ll a, ll p, ll m = mod){
    ll ret = 1;
    while(p > 0){
        if (p & 1){
            ret *= a;
            ret %= m;
        }
        p >>= 1;
        a *= a;
        a %= m;
    }
    return ret;
}
ll inv(ll a){
    return mpw(a, mod-2);
}

bool ex[maxn][maxn];
void run(int n){
    vector<vector<int>> cc;
    REP1(i, n){
        cc.pb({i});
    }

    REP(i, n-1){
        REP1(j, n){
            REP1(k, n){
                int ret = query(1, 1, {j}, {k});
                if (ret && !ex[j][k]){
                    setRoad(k, j);
                    ex[j][k] = 1;
                    break;
                }
            }
        }
    }
}

Compilation message

icc.cpp: In function 'void run(int)':
icc.cpp:53:47: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   53 |                 int ret = query(1, 1, {j}, {k});
      |                                               ^
      |                                               |
      |                                               int
In file included from icc.cpp:2:
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:53:47: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   53 |                 int ret = query(1, 1, {j}, {k});
      |                                               ^
      |                                               |
      |                                               int
In file included from icc.cpp:2:
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);
      |                                 ~~~~~^