답안 #333944

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
333944 2020-12-08T03:48:18 Z daniel920712 CEOI16_icc (CEOI16_icc) C++14
컴파일 오류
0 ms 0 KB
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <time.h>
#include <assert.h>
#include "icc.h"

using namespace std;
bool have[105][105]={0};
int a[105],b[105];
void run(int N)
{
    int ok=1,i,j,k,x,y,t1,t2,con=0,;
    for(i=1;i<N;i++) for(j=1;j<=N;j++) have[i][j]=0;
    for(i=1;i<N;i++)
    {
        t1=0;
        for(j=1;j<=N;j++)
        {
            a[0]=j;
            for(k=j+1;k<=N;k++)
            {
                b[0]=k;
                if(j==k) continue;
                if(have[j][k]) continue;
                con++;
                if(query(1,1,a,b))
                {
                    if(t1) while(1);
                    t1++;
                    x=j;
                    y=k;
                }
            }
        }
        setRoad(x,y);
        have[x][y]=1;
        have[y][x]=1;
    }
}

Compilation message

icc.cpp: In function 'void run(int)':
icc.cpp:19:36: error: expected unqualified-id before ';' token
   19 |     int ok=1,i,j,k,x,y,t1,t2,con=0,;
      |                                    ^
icc.cpp:19:9: warning: unused variable 'ok' [-Wunused-variable]
   19 |     int ok=1,i,j,k,x,y,t1,t2,con=0,;
      |         ^~
icc.cpp:19:27: warning: unused variable 't2' [-Wunused-variable]
   19 |     int ok=1,i,j,k,x,y,t1,t2,con=0,;
      |                           ^~