QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#375555#5531. ICCsichengzhouCompile Error//C++141.5kb2024-04-03 12:39:222024-04-03 12:39:23

Judging History

你现在查看的是测评时间为 2024-04-03 12:39:23 的历史记录

  • [2024-07-01 04:28:38]
  • 管理员手动重测本题所有提交记录
  • [2024-04-03 12:39:23]
  • 评测
  • [2024-04-03 12:39:22]
  • 提交

answer

#include "icc.h"
#include<bits/stdc++.h>
using namespace std;
int n;
vector<int>c[N];
int a[N],b[N],lena,lenb;
void run(int n)
{
    for(int i=1;i<=n;i++)
    {
        c[i].push_back(i);
    }
    for(int t=1;t<n;t++)
    {
    for(int j=0;j<=6;j++)
    {
        lena=lenb=0;
        for(int i=1;i<=n;i++)
        {
            for(int k=0;k<c[i].size();k++)
            {
                if(i>>j&1)
                {
                    a[lena++]=c[i][k];
                }else{
                    b[lenb++]=c[i][k];
                }
            }
        }
        if(query(lena,lenb,a,b))
        {
            int la,ra;
            la=0,ra=lena;
            while(la+1<ra)
            {
                int mid=(la+ra)/2;
                if(query(ra-la,lenb,a+la,b))
                {
                    la=mid;
                }else{
                    ra=mid;
                }
            }
            int lb,rb;
            lb=0,rb=lenb;
            while(lb+1<rb)
            {
                int mid=(lb+rb)/2;
                if(query(lena,rb-lb,a,b+lb))
                {
                    lb=mid;
                }else{
                    rb=mid;
                }
            }
            setRoad(a[la],b[lb]);
            for(int v=0;v<c[b[lb]].size();v++)
            {
                c[a[la]].push_back(c[b[lb]][v]);
            }
            c[b[lb]].clear();
            break;
        }
    }
    }
}
int main()
{
    return 0;
}

详细

answer.code:5:14: error: ‘N’ was not declared in this scope
    5 | vector<int>c[N];
      |              ^
answer.code:6:7: error: ‘N’ was not declared in this scope
    6 | int a[N],b[N],lena,lenb;
      |       ^
answer.code:6:12: error: ‘N’ was not declared in this scope
    6 | int a[N],b[N],lena,lenb;
      |            ^
answer.code: In function ‘void run(int)’:
answer.code:11:9: error: ‘c’ was not declared in this scope
   11 |         c[i].push_back(i);
      |         ^
answer.code:20:27: error: ‘c’ was not declared in this scope
   20 |             for(int k=0;k<c[i].size();k++)
      |                           ^
answer.code:24:21: error: ‘a’ was not declared in this scope
   24 |                     a[lena++]=c[i][k];
      |                     ^
answer.code:26:21: error: ‘b’ was not declared in this scope
   26 |                     b[lenb++]=c[i][k];
      |                     ^
answer.code:30:28: error: ‘a’ was not declared in this scope
   30 |         if(query(lena,lenb,a,b))
      |                            ^
answer.code:30:30: error: ‘b’ was not declared in this scope
   30 |         if(query(lena,lenb,a,b))
      |                              ^
answer.code:57:27: error: ‘c’ was not declared in this scope
   57 |             for(int v=0;v<c[b[lb]].size();v++)
      |                           ^
answer.code:61:13: error: ‘c’ was not declared in this scope
   61 |             c[b[lb]].clear();
      |             ^