QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#943129 | #4923. 整数 | Yonghu_3913 | Compile Error | / | / | C++20 | 760b | 2025-03-19 17:48:53 | 2025-03-19 17:48:54 |
Judging History
This is the latest submission verdict.
- [2025-03-19 17:48:54]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2025-03-19 17:48:53]
- Submitted
answer
#include <bits/stdc++.h>
#include <integer.h>
using namespace std;
mt19937 rnd(time(NULL));
vector <int> findPermutation(int n) {
vector <int> p, ans;
for(int i = 0; i < n; i++)
operate(i), p.push_back(i), ans.push_back(-1);
shuffle(p.begin(),p.end(),rnd);
int round = 0,lst = n;
while(p.size()) {
int lim = n,tmp = round;
while(tmp & 1) tmp >>= 1,lim++;
vector<int> nxt;
for(auto i : p) {
int x = operate(i);
if(x > lst) nxt.push_back(i);
else ans[i] = n + lim + x - lst - 1,lim = lim + x - lst - 1;
lst = x;
}
for(int i = 0;i < n;i++){
if(ans[i] > -1 && ans[i] < n) lst = operate(i);
if(ans[i] >= n) ans[i] -= n;
if(ans[i] == 0) lst = operate(i);
}
round++,p = nxt;
}
return ans;
}
Details
implementer.cpp: In function ‘void integer_grader_F0F01B59EA9BF23E::generateToken()’: implementer.cpp:19:57: warning: format ‘%llX’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘std::mersenne_twister_engine<long unsigned int, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>::result_type’ {aka ‘long unsigned int’} [-Wformat=] 19 | for(int i = 1; i <= 40; i++) printf("%llX", (rng() & 15)); | ~~~^ ~~~~~~~~~~~~ | | | | | std::mersenne_twister_engine<long unsigned int, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>::result_type {aka long unsigned int} | long long unsigned int | %lX implementer.cpp: In function ‘void integer_grader_F0F01B59EA9BF23E::main()’: implementer.cpp:47:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 47 | scanf("%d", &n); | ~~~~~^~~~~~~~~~ implementer.cpp:49:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 49 | scanf("%d", p + i); | ~~~~~^~~~~~~~~~~~~ answer.code:2:10: fatal error: integer.h: No such file or directory 2 | #include <integer.h> | ^~~~~~~~~~~ compilation terminated.