QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#419938 | #403. Memory2 | vme50# | 100 ✓ | 1ms | 3892kb | C++17 | 710b | 2024-05-24 12:51:52 | 2024-05-24 12:51:52 |
Judging History
answer
#include <bits/stdc++.h>
#include "Memory2_lib.h"
using namespace std;
#define N 105
mt19937 rand1(998244353);
int a[N],st[N],st1[N],z[N],cnt[N];bool vs[N];
int rdm(int l,int r) {return rand1()%(r-l+1)+l;}
void Solve(int T,int n)
{
for(int i=1;i<=n*2;++i) st[++st[0]]=i;
while(st[0])
{
int x=rdm(1,st[0]);st1[0]=0;
for(int i=1;i<=n;++i) cnt[i]=0;
for(int i=1;i<=st[0];++i)
if(x!=i) ++cnt[z[i]=Flip(st[x]-1,st[i]-1)+1];
for(int i=1;i<=n;++i) if(cnt[i]&1) ++cnt[z[x]=i];
for(int i=1;i<=st[0];++i)
if(cnt[z[i]]<3) a[st[i]]=z[i];
else st1[++st1[0]]=st[i];swap(st,st1);
}
for(int i=1;i<=n*2;++i)
for(int j=i+1;j<=n*2;++j) if(a[i]==a[j])
Answer(i-1,j-1,a[i]-1);
}
詳細信息
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 0ms
memory: 3760kb
Test #2:
score: 0
Accepted
time: 0ms
memory: 3756kb
Test #3:
score: 0
Accepted
time: 0ms
memory: 3812kb
Test #4:
score: 0
Accepted
time: 0ms
memory: 3800kb
Test #5:
score: 0
Accepted
time: 0ms
memory: 3820kb
Test #6:
score: 0
Accepted
time: 0ms
memory: 3820kb
Test #7:
score: 0
Accepted
time: 0ms
memory: 3760kb
Test #8:
score: 0
Accepted
time: 0ms
memory: 3812kb
Subtask #2:
score: 50
Accepted
Test #9:
score: 50
Accepted
time: 0ms
memory: 3736kb
Test #10:
score: 0
Accepted
time: 0ms
memory: 3756kb
Test #11:
score: 0
Accepted
time: 0ms
memory: 3808kb
Test #12:
score: 0
Accepted
time: 0ms
memory: 3752kb
Test #13:
score: 0
Accepted
time: 0ms
memory: 3812kb
Test #14:
score: 0
Accepted
time: 0ms
memory: 3744kb
Test #15:
score: 0
Accepted
time: 0ms
memory: 3792kb
Test #16:
score: 0
Accepted
time: 0ms
memory: 3884kb
Test #17:
score: 0
Accepted
time: 0ms
memory: 3824kb
Test #18:
score: 0
Accepted
time: 0ms
memory: 3824kb
Subtask #3:
score: 40
Accepted
Test #19:
score: 40
Accepted
time: 0ms
memory: 3804kb
Test #20:
score: 0
Accepted
time: 0ms
memory: 3884kb
Test #21:
score: 0
Accepted
time: 0ms
memory: 3892kb
Test #22:
score: 0
Accepted
time: 0ms
memory: 3888kb
Test #23:
score: 0
Accepted
time: 0ms
memory: 3824kb
Test #24:
score: 0
Accepted
time: 0ms
memory: 3804kb
Test #25:
score: 0
Accepted
time: 0ms
memory: 3800kb
Test #26:
score: 0
Accepted
time: 0ms
memory: 3892kb
Test #27:
score: 0
Accepted
time: 0ms
memory: 3764kb
Test #28:
score: 0
Accepted
time: 1ms
memory: 3860kb
Extra Test:
score: 0
Extra Test Passed