QOJ.ac
QOJ
QOJ is currently under a maintenance. It might be unavailable in the following a few hours.
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#836898 | #8955. 排列 | 275307894a# | 100 ✓ | 22ms | 3988kb | C++14 | 1.4kb | 2024-12-29 09:29:35 | 2024-12-29 09:29:41 |
Judging History
answer
#include<bits/stdc++.h>
#include"interactor.h"
#define Gc() getchar()
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define eb emplace_back
#define all(x) x.begin(),x.end()
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;
const int N=2e5+5,M=N*40+5,K=1000+5,mod=998244353,Mod=mod-1;const db eps=1e-9;const int INF=1e9+7;mt19937 rnd(28382);
#define Tp template<typename T>
#define Ts template<typename T,typename... Ar>
namespace Debug{
Tp void _debug(char* f,T t){cerr<<f<<'='<<t<<endl;}
Ts void _debug(char* f,T x,Ar... y){while(*f!=',') cerr<<*f++;cerr<<'='<<x<<",";_debug(f+1,y...);}
#ifdef LOCAL
#define gdb(...) _debug((char*)#__VA_ARGS__,__VA_ARGS__)
#else
#define gdb(...) void()
#endif
}using namespace Debug;
void split(ull x,ui &a,ui &b){
a=x;b=x>>32;
}
ull merge(ui a,ui b){
return (1ull*b)<<32|a;
}
int guessb(){
mt19937_64 rnd(time(0));
int k=85;
while(k--){
ui a,b;split(rnd(),a,b);
ui c,d;split(getperm(merge(a,b),0),c,d);
ui e,f;split(getperm(merge(c,d^1),1),e,f);e^=1;
ui g,h;split(getperm(merge(e,f),0),g,h);
if(g^c^b^f) return 0;
}
return 1;
}
詳細信息
Subtask #1:
score: 20
Accepted
Test #1:
score: 20
Accepted
time: 1ms
memory: 3932kb
input:
1 12824419990230211502 6284770797132110889
Test #2:
score: 20
Accepted
time: 1ms
memory: 3980kb
input:
1 12762739041067830349 11433405002106668439
Test #3:
score: 20
Accepted
time: 0ms
memory: 3964kb
input:
1 15392126947150969160 5793114871588882562
Test #4:
score: 20
Accepted
time: 0ms
memory: 3844kb
input:
1 5403124586151704163 13246826124085219982
Subtask #2:
score: 20
Accepted
Dependency #1:
100%
Accepted
Test #5:
score: 20
Accepted
time: 1ms
memory: 3932kb
input:
4 12858195064120798737 1991848486890255815
Test #6:
score: 20
Accepted
time: 1ms
memory: 3856kb
input:
4 4215194446341029033 532011002147104333
Test #7:
score: 20
Accepted
time: 1ms
memory: 3988kb
input:
4 14938454278325758444 7968986768611348785
Test #8:
score: 20
Accepted
time: 1ms
memory: 3876kb
input:
4 13774895601524998134 2915392846985319377
Subtask #3:
score: 60
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Test #9:
score: 60
Accepted
time: 19ms
memory: 3912kb
input:
100 7388216795551052497 13719330562290875706
Test #10:
score: 60
Accepted
time: 19ms
memory: 3984kb
input:
100 10572899502107715125 745983082109321559
Test #11:
score: 60
Accepted
time: 20ms
memory: 3928kb
input:
100 17723176268630430996 12841950687728405137
Test #12:
score: 60
Accepted
time: 21ms
memory: 3980kb
input:
100 8945431235884021644 14776825312425534426
Test #13:
score: 60
Accepted
time: 15ms
memory: 3924kb
input:
100 6594131267363786116 9980162954088470562
Test #14:
score: 60
Accepted
time: 20ms
memory: 3984kb
input:
100 7119583533562698863 1761591402319344194
Test #15:
score: 60
Accepted
time: 20ms
memory: 3924kb
input:
100 2681022238916974379 8182351237431726406
Test #16:
score: 60
Accepted
time: 17ms
memory: 3924kb
input:
100 4978487412409460166 1633639412652822097
Test #17:
score: 60
Accepted
time: 19ms
memory: 3888kb
input:
100 9344137772339081966 9926540854104637874
Test #18:
score: 60
Accepted
time: 18ms
memory: 3924kb
input:
100 4240406447361230263 15758957544660231693
Test #19:
score: 60
Accepted
time: 17ms
memory: 3932kb
input:
100 16804675904569566283 10955664802868632378
Test #20:
score: 60
Accepted
time: 22ms
memory: 3928kb
input:
100 15399036156042107153 4908539726546110961