QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#116162 | #6661. 야유회 | xtqqwq# | Compile Error | / | / | C++14 | 843b | 2023-06-28 11:11:14 | 2024-05-31 18:19:10 |
Judging History
你现在查看的是最新测评结果
- [2024-05-31 18:19:10]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-06-28 11:11:14]
- 提交
answer
#include<bits/stdc++.h>
#include "workshop.h"
#define pb push_back
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef long double ld;
template <typename T> bool chkmin(T &x,T y){return x>y?x=y,1:0;}
template <typename T> bool chkmax(T &x,T y){return x<y?x=y,1:0;}
int p[100005];
mt19937 mrand(1);
void init(){
for(int i=0;i<100000;i++) p[i]=i;
shuffle(p,p+100000);
}
int morning(int my_num,int right_num){
return p[my_num];
}
int afternoon(int left_num, int my_num, int right_num){
return my_num;
}
int evening(int left_num, int my_num, int right_num){
for(int i=0;i<17;i++){
if(((my_num>>i)&1)!=((right_num>>i)&1)) return 2*i+((my_num>>i)&1);
}
}
Details
answer.code: In function ‘void init()’: answer.code:25:16: error: no matching function for call to ‘shuffle(int [100005], int*)’ 25 | shuffle(p,p+100000); | ~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/algorithm:62, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from answer.code:1: /usr/include/c++/11/bits/stl_algo.h:3729:5: note: candidate: ‘template<class _RAIter, class _UGenerator> void std::shuffle(_RAIter, _RAIter, _UGenerator&&)’ 3729 | shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, | ^~~~~~~ /usr/include/c++/11/bits/stl_algo.h:3729:5: note: template argument deduction/substitution failed: answer.code:25:16: note: candidate expects 3 arguments, 2 provided 25 | shuffle(p,p+100000); | ~~~~~~~^~~~~~~~~~~~ answer.code: In function ‘int evening(int, int, int)’: answer.code:40:1: warning: control reaches end of non-void function [-Wreturn-type] 40 | } | ^