QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#833018#9241. Sphinxhansiyuan#Compile Error//C++14523b2024-12-26 12:01:432024-12-26 12:01:49

Judging History

你现在查看的是最新测评结果

  • [2024-12-26 12:01:49]
  • 评测
  • [2024-12-26 12:01:43]
  • 提交

answer

#include "sphinx.h"
#include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
vi E,ans;
vi find_colours(int n,vi U,vi V){
    E.resize(n);
    ans.resize(n);
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            for(int k=0;k<n;k++){
                if(i==k) E[k]=-1;
                else E[k]=j;
            }
            int c = perform_experiment(E);
            if(c==1){
                ans[i] = j;
                break;
            }
        }
    }
    return ans;
}

详细

implementer.cpp: In function ‘int {anonymous}::sz(const C&)’:
implementer.cpp:26:52: error: ‘size’ is not a member of ‘std’; did you mean ‘size_t’?
   26 | template<class C> int sz(const C& c) { return std::size(c); }
      |                                                    ^~~~
      |                                                    size_t