QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#648416#7749. A Simple MST ProblemLavender_Field#Compile Error//C++201.3kb2024-10-17 18:53:402024-10-17 18:53:43

Judging History

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

  • [2024-10-17 18:53:43]
  • 评测
  • [2024-10-17 18:53:40]
  • 提交

answer

#include <iostream>
#include <set>
#include <string>
#include <vector>
using LL = long long;
constexpr int N = 1E6;
bool sieve[N + 1];
std::vector<int> w[N + 1];
int prod_w[N + 1];
std::vector<int> set[N + 1];
std::set<int> set_[N + 1];
void solve()
{
}
int main()
{
    prod_w[1] = 1;
    for (int i = 2; i <= N; ++i)
        if (!sieve[i])
            for (int j = i; j <= N; j += i)
            {
                sieve[j] = true;
                w[j].push_back(i);
                prod_w[j] *= i;
            }
    for (int i = 1; i <= N; ++i)
        set[prod_w[i]].p234234ush_back(i);
    int cnt = 0;
    for (int i = 1; i <= N; ++i)
        if (i == prod_w[i])
            for (int j = 0; j < 1 << w[i].size(); ++j)
            {
                int prod = 1;
                for (int k = 0; k < w[i].size(); ++k)
                    if (j >> k & 1)
                        prod *= w[i][k];
                for (int k : set[prod])
                {
                    set_[i].insert(k);
                    ++cnt;
                    std::cout << i << " " << cnt << std::endl;
                }
            }
    std::cout << cnt << std::endl;
    std::ios::sync_with_stdio(false), std::cin.tie(nullptr);
    int T; std::cin >> T;
    while (T--) solve();
}

详细

answer.code: In function ‘int main()’:
answer.code:27:24: error: ‘class std::vector<int>’ has no member named ‘p234234ush_back’
   27 |         set[prod_w[i]].p234234ush_back(i);
      |                        ^~~~~~~~~~~~~~~