QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#406598#6661. 야유회lmqzzz0 3ms4184kbC++202.0kb2024-05-07 15:02:282024-05-07 15:02:30

Judging History

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

  • [2024-05-07 15:02:30]
  • 评测
  • 测评结果:0
  • 用时:3ms
  • 内存:4184kb
  • [2024-05-07 15:02:28]
  • 提交

answer


#include <bits/stdc++.h>

// #include "workshop.h"
using namespace std;

namespace {
const int N = 1e5;
int perm[N];
const int B = 160;
const int O = 10;
int cnt = 0;

};  // namespace

void init() {
        iota(perm, perm + N, 0);
        shuffle(perm, perm + N, mt19937(123));
        for (int i = 0; i < N; i++) perm[i] %= B;
}

int morning(int my_num, int right_num) {
        return perm[my_num] * B + perm[right_num];
}

int afternoon(int left_num, int my_num, int right_num) {
        vector<int> a;
        a.emplace_back(left_num / B);
        a.emplace_back(left_num % B);
        a.emplace_back(right_num / B);
        a.emplace_back(right_num % B);
        if (a[1] == a[0] && a[1] == a[2]) {
                cnt++;
                cnt %= B;
                if (cnt == 0) cnt++;
                a[1] = (a[0] + cnt) % B;
        }
        return ((a[0] * B + a[1]) * B + a[2]) * B + a[3];
}

int evening(int left_num, int my_num, int right_num) {
        vector<int> a;
        a.emplace_back(right_num % B), right_num /= B;
        a.emplace_back(right_num % B), right_num /= B;
        a.emplace_back(right_num % B), right_num /= B;
        a.emplace_back(right_num % B), right_num /= B;
        left_num /= B;
        left_num /= B;
        a.emplace_back(left_num % B), left_num /= B;
        a.emplace_back(left_num % B), left_num /= B;
        reverse(a.begin(), a.end());
        for (int& x : a) x %= O;

        if (a[1] == a[2] && a[2] == a[3]) {
                cnt++;
                cnt %= O;
                if (cnt == 0) cnt++;
                a[2] = (a[1] + cnt) % O;
                return a[2];
        } else if (a[2] == a[3] && a[3] != a[4]) {
                cnt++;
                cnt %= O;
                if (cnt == 0) cnt++;
                a[2] = (a[1] + cnt) % O;
                if (a[2] == a[3]) (a[2] += 1) %= O;
                if (a[2] == a[1]) (a[2] += 1) %= O;
                return a[2];
        } else {
                return a[2] % O;
        }
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 3ms = 2ms + 1ms
memory: 4184kb,3896kb

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
10 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 
000058e8 0000284d 00001632 0000247b 00000be9 0000141f 00005e83 00002e36 00004f42 000043aa 00002ab6 00003bf4 000012a6 00000962...

input:

dd180566-1d37-PIPE-b85d-c176ae85727d
10 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 
000058e8 0000284d 00001632 0000247b 00000be9 0000141f 00005e83 00002e36 00004f42 000043aa 00002ab6 00003bf4 000012a6 00000962...

output:

64be09ab-d709-ERROR-82bc-c23f6124dd26
Wrong Answer [7]

result:

wrong answer Wrong Answer [7]

Subtask #2:

score: 0
Wrong Answer

Test #8:

score: 0
Wrong Answer
time: 1ms = 0ms + 1ms
memory: 4116kb,3788kb

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
10 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 
000058e8 0000284d 00001632 0000247b 00000be9 0000141f 00005e83 00002e36 00004f42 000043aa 00002ab6 00003bf4 000012a6 00000962...

input:

dd180566-1d37-PIPE-b85d-c176ae85727d
10 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 
000058e8 0000284d 00001632 0000247b 00000be9 0000141f 00005e83 00002e36 00004f42 000043aa 00002ab6 00003bf4 000012a6 00000962...

output:

64be09ab-d709-ERROR-82bc-c23f6124dd26
Wrong Answer [7]

result:

wrong answer Wrong Answer [7]