QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#66280#5015. 树NATURAL6Compile Error//C++14331b2022-12-08 11:15:492022-12-08 11:15:53

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-12-08 11:15:53]
  • 评测
  • [2022-12-08 11:15:49]
  • 提交

answer

#include<bits/stdc++.h>
#include"tree.h"
int ask(int u,std::vector<int>v);
void answer(int u,int v);
void solver(int n,int A,int B)
{
	int dis;
	std::vector<int>a(1);
	for(int i=1;i<=n;++i)
	{
		for(int j=i+1;j<=n;++j)
		{
			a.push_back(j);
			dis=ask(i,a);
			if(dis)answer(i,j);
			a.pop();
		}
	}
	return; 
}

Details

implementer.cpp: In function ‘void regduj260135279::init()’:
implementer.cpp:32:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   32 |                 scanf("%d",&n);
      |                 ~~~~~^~~~~~~~~
implementer.cpp:45:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   45 |                         scanf("%d%d",&u,&v);
      |                         ~~~~~^~~~~~~~~~~~~~
answer.code: In function ‘void solver(int, int, int)’:
answer.code:16:27: error: ‘class std::vector<int>’ has no member named ‘pop’
   16 |                         a.pop();
      |                           ^~~