QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#125600#91. Secret PermutationQwerty1232Compile Error//C++20249b2023-07-16 23:56:482023-07-16 23:56:51

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-16 23:56:51]
  • 评测
  • [2023-07-16 23:56:48]
  • 提交

answer

#include <bits/stdc++.h>

//#include "permutation.h"

std::mt19937 rnd(2086);
std::vector<int> vec;

void solve(int n) {
	rnd.seed(2);
 	int n = 7;
	vec.resize(n);
    std::shuffle(vec.begin(), vec.begin() + 4, rnd);
    return 0;
}


詳細信息

answer.code: In function ‘void solve(int)’:
answer.code:10:13: error: declaration of ‘int n’ shadows a parameter
   10 |         int n = 7;
      |             ^
answer.code:8:16: note: ‘int n’ previously declared here
    8 | void solve(int n) {
      |            ~~~~^
answer.code:13:12: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
   13 |     return 0;
      |            ^