QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#212938#91. Secret PermutationAhmed57#3 1ms3872kbC++23462b2023-10-13 23:22:492024-07-04 02:49:59

Judging History

你现在查看的是最新测评结果

  • [2024-07-04 02:49:59]
  • 评测
  • 测评结果:3
  • 用时:1ms
  • 内存:3872kb
  • [2023-10-13 23:22:49]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
#include "permutation.h"

void solve(int N){
    vector<int> v;
    for(int i = 1;i<=N;i++){
        v.push_back(i);
    }
    do{
        if(query(v)==N-1){
            vector<int> lol(N);
        int cnt = 0;
            for(auto i:v){
                lol[i-1] = ++cnt;
            }
            answer(lol);
            return ;
        }
    }while(next_permutation(v.begin(),v.end()));
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 3
Acceptable Answer

Test #1:

score: 3
Acceptable Answer
time: 1ms
memory: 3800kb

input:

7
5 7 1 3 2 4 6

output:

0 1342 1050790

result:

points 0.20 1342 steps

Test #2:

score: 10.5
Acceptable Answer
time: 1ms
memory: 3872kb

input:

4
3 4 2 1

output:

0 7 0

result:

points 0.70 7 steps

Test #3:

score: 3
Acceptable Answer
time: 1ms
memory: 3776kb

input:

6
3 5 4 2 6 1

output:

0 511 0

result:

points 0.20 511 steps

Test #4:

score: 3
Acceptable Answer
time: 1ms
memory: 3868kb

input:

7
5 7 2 6 4 3 1

output:

0 969 0

result:

points 0.20 969 steps

Test #5:

score: 3
Acceptable Answer
time: 1ms
memory: 3776kb

input:

7
7 4 6 2 1 3 5

output:

0 221 9010

result:

points 0.20 221 steps

Test #6:

score: 3
Acceptable Answer
time: 1ms
memory: 3800kb

input:

7
1 2 6 5 4 7 3

output:

0 111 11756225322523

result:

points 0.20 111 steps

Subtask #2:

score: 0
Time Limit Exceeded

Dependency #1:

20%
Acceptable Answer

Test #7:

score: 0
Time Limit Exceeded

input:

50
33 8 50 28 6 40 15 17 22 11 30 32 23 10 27 48 13 16 29 24 43 44 9 45 47 4 5 25 42 41 2 14 21 35 19 12 7 36 1 46 26 3 49 34 18 20 37 31 38 39

output:

Unauthorized output

result:


Subtask #3:

score: 0
Skipped

Dependency #1:

20%
Acceptable Answer

Dependency #2:

0%