QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#125598 | #91. Secret Permutation | Qwerty1232 | Compile Error | / | / | C++20 | 237b | 2023-07-16 23:56:18 | 2023-07-16 23:56:18 |
Judging History
This is the latest submission verdict.
- [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:18]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2023-07-16 23:56:18]
- Submitted
answer
#include <bits/stdc++.h>
//#include "permutation.h"
std::mt19937 rnd(2086);
std::vector<int> vec(n);
void solve(int n) {
int n = 7;
vec.resize(n);
std::shuffle(vec.begin(), vec.begin() + 4, rnd);
return 0;
}
详细
answer.code:6:22: error: ‘n’ was not declared in this scope; did you mean ‘yn’? 6 | std::vector<int> vec(n); | ^ | yn answer.code: In function ‘void solve(int)’: answer.code:9:13: error: declaration of ‘int n’ shadows a parameter 9 | int n = 7; | ^ answer.code:8:16: note: ‘int n’ previously declared here 8 | void solve(int n) { | ~~~~^ answer.code:12:12: error: return-statement with a value, in function returning ‘void’ [-fpermissive] 12 | return 0; | ^