QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#168971#6661. 야유회Cyanmond0 0ms0kbC++171.5kb2023-09-09 08:59:342023-09-09 08:59:36

Judging History

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

  • [2023-09-09 08:59:36]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-09-09 08:59:34]
  • 提交

answer

#include "workshop.h"
#include <bits/stdc++.h>

constexpr int M = 40;
std::array<int, M> P;

void init() {
    std::mt19937 mt(10);
    std::iota(P.begin(), P.end(), 0);
    std::shuffle(P.begin(), P.end(), mt);
}

int morning(int my_num, int right_num) {
    return my_num;
    std::uniform_int_distribution<int> dist(0, M - 1);
    const auto x = P[my_num % M], y = P[right_num % M];
    if (x != y) return x;
    else {
        std::mt19937 mt(my_num + right_num);
        int ret = -1;
        while (true) {
            const auto u = dist(mt);
            if (u != y) {
                ret = u;
                break;
            }
        }
        return ret;
    }
}

int afternoon(int left_num, int my_num, int right_num) {
    return my_num;
    std::uniform_int_distribution<int> dist(0, M - 1);
    std::mt19937 mt(my_num + right_num + left_num);
    int ret = -1;
    if (my_num != right_num) return my_num;
    while (true) {
        const auto u = dist(mt);
        if (u != left_num and u != right_num) {
            ret = u;
            break;
        }
    }
    return ret;
}

int evening(int left_num, int my_num, int right_num) {
    return my_num;
    std::uniform_int_distribution<int> dist(0, M - 1);
    std::mt19937 mt(my_num + left_num + right_num);
    int ret = -1;
    if (my_num != right_num) return my_num;
    while (true) {
        const auto u = dist(mt);
        if (u != left_num and u != right_num) {
            ret = u;
            break;
        }
    }
    return ret;
}

详细

Subtask #1:

score: 0
Dangerous Syscalls

Test #1:

score: 0
Dangerous Syscalls

input:

2dc2b1d4-8de2-INPUT-bcd3-aa55b691fdb3
1
2
40 40
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
40 40
0 3 1 5 7 9 6 4 2 10 8 23 21 25 27 29 26 24 22 30 28 13 11 15 17 19 16 14 12 20 18 33 31 35 37 39 36 34 32 38

output:

dd180566-1d37-PIPE-b85d-c176ae85727d
40 2
28 28 28 28
89 88 8b 8a 8d 8c 8f 8e 81 80 83 82 85 84 87 86 99 98 9b 9a 9d 9c 9f 9e 91 90 93 92 95 94 97 96 a9 a8 ab aa ad ac af ae 
00000089 00000088 0000008b 0000008a 0000008d 0000008c 0000008f 0000008e 00000081 00000080 00000083 00000082 00000085 00000084...

input:

dd180566-1d37-PIPE-b85d-c176ae85727d
40 2
28 28 28 28
89 88 8b 8a 8d 8c 8f 8e 81 80 83 82 85 84 87 86 99 98 9b 9a 9d 9c 9f 9e 91 90 93 92 95 94 97 96 a9 a8 ab aa ad ac af ae 
00000089 00000088 0000008b 0000008a 0000008d 0000008c 0000008f 0000008e 00000081 00000080 00000083 00000082 00000085 00000084...

output:

4468cc07-dabe-OUTPUT-ba95-7ddd49645c94
40

result:


Subtask #2:

score: 0
Dangerous Syscalls

Test #8:

score: 0
Dangerous Syscalls

input:

2dc2b1d4-8de2-INPUT-bcd3-aa55b691fdb3
2
2
40 40
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
40 40
0 3 1 5 7 9 6 4 2 10 8 23 21 25 27 29 26 24 22 30 28 13 11 15 17 19 16 14 12 20 18 33 31 35 37 39 36 34 32 38

output:

dd180566-1d37-PIPE-b85d-c176ae85727d
40 2
28 28 28 28
89 88 8b 8a 8d 8c 8f 8e 81 80 83 82 85 84 87 86 99 98 9b 9a 9d 9c 9f 9e 91 90 93 92 95 94 97 96 a9 a8 ab aa ad ac af ae 
00000089 00000088 0000008b 0000008a 0000008d 0000008c 0000008f 0000008e 00000081 00000080 00000083 00000082 00000085 00000084...

input:

dd180566-1d37-PIPE-b85d-c176ae85727d
40 2
28 28 28 28
89 88 8b 8a 8d 8c 8f 8e 81 80 83 82 85 84 87 86 99 98 9b 9a 9d 9c 9f 9e 91 90 93 92 95 94 97 96 a9 a8 ab aa ad ac af ae 
00000089 00000088 0000008b 0000008a 0000008d 0000008c 0000008f 0000008e 00000081 00000080 00000083 00000082 00000085 00000084...

output:

4468cc07-dabe-OUTPUT-ba95-7ddd49645c94
40

result: