QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#829832 | #9910. 颠倒歌 | hhoppitree# | 7 | 1ms | 4068kb | C++14 | 389b | 2024-12-24 14:01:24 | 2024-12-24 14:01:24 |
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 5005, P = 998244353;
vector<int> G[N];
signed main() {
int ty, m, n; scanf("%d%d%d", &ty, &m, &n);
if (ty == 1) {
int res = 1;
for (int i = 1; i <= n - 2; ++i) res = 1ll * res * n % P;
printf("%d\n", res);
} else {
printf("%d\n", n * n + 1);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 4008kb
input:
1 4 7 1 7 4 1 2 3 2 6 5 4 7 2 5 7 7 3 1 2 4 1 4 3 5 6 5 4 2 4 3 5 7 2 2 6 1 7 1 7 6 4 5 2 3 6 3 1 4 5
output:
16807
result:
wrong answer 1st lines differ - expected: '9', found: '16807'
Subtask #2:
score: 0
Wrong Answer
Test #5:
score: 0
Wrong Answer
time: 0ms
memory: 3936kb
input:
0 1 189 77 175 145 175 4 175 92 175 175 33 175 125 175 185 157 175 186 175 115 175 113 175 38 175 175 138 175 133 175 48 175 128 175 66 175 34 175 148 150 175 175 104 175 84 175 59 175 154 80 175 176 175 135 175 55 175 139 175 175 132 175 91 13 175 175 110 155 175 175 60 175 184 73 175 152 175 83 17...
output:
35722
result:
wrong answer 1st lines differ - expected: '5245226', found: '35722'
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Skipped
Dependency #4:
0%
Subtask #6:
score: 0
Skipped
Dependency #5:
0%
Subtask #7:
score: 7
Accepted
Test #25:
score: 7
Accepted
time: 0ms
memory: 4020kb
input:
1 1 156 69 74 65 126 110 16 134 129 3 22 78 5 140 23 53 138 109 67 82 74 42 57 23 143 12 112 7 13 154 105 100 118 63 28 41 37 145 25 80 142 111 148 81 85 133 13 104 89 83 14 39 24 120 97 98 131 94 55 107 91 38 130 122 36 2 32 82 94 35 49 40 108 68 146 101 130 101 76 105 58 80 137 152 87 78 66 32 55 ...
output:
261947439
result:
ok single line: '261947439'
Test #26:
score: 7
Accepted
time: 0ms
memory: 4068kb
input:
1 1 168 140 135 69 51 33 66 138 48 168 90 102 43 137 98 117 21 88 131 29 14 117 157 77 78 85 88 119 32 114 68 55 67 160 166 12 149 155 85 20 113 132 149 131 19 97 139 22 78 16 157 151 143 99 156 159 71 72 119 161 163 68 28 101 89 27 133 96 146 125 44 151 24 14 114 116 111 89 25 115 138 46 1 51 47 40...
output:
260505142
result:
ok single line: '260505142'
Test #27:
score: 7
Accepted
time: 0ms
memory: 4004kb
input:
1 1 155 77 28 89 81 138 11 85 7 124 53 29 52 116 32 151 66 103 80 145 77 82 51 116 138 141 144 57 20 34 101 14 84 75 68 42 64 95 117 117 137 122 33 76 50 12 71 112 44 134 83 134 18 105 10 75 122 106 94 84 69 1 123 140 10 70 71 78 133 24 152 87 13 9 31 135 142 101 146 149 129 28 16 52 39 26 119 146 3...
output:
252700555
result:
ok single line: '252700555'
Test #28:
score: 7
Accepted
time: 0ms
memory: 3932kb
input:
1 1 200 24 110 97 182 163 183 115 67 21 193 168 118 88 19 10 150 33 76 15 184 138 131 166 143 151 167 17 60 188 92 110 33 9 65 186 74 198 170 144 161 69 134 179 189 191 70 64 79 10 84 65 107 66 149 123 191 184 141 107 30 170 129 159 186 108 132 17 68 46 198 158 41 13 55 101 59 20 72 200 63 128 23 89...
output:
85910356
result:
ok single line: '85910356'
Subtask #8:
score: 0
Wrong Answer
Dependency #7:
100%
Accepted
Test #29:
score: 0
Wrong Answer
time: 0ms
memory: 4004kb
input:
1 1 170 104 123 43 65 8 61 169 138 20 160 34 169 133 25 129 2 115 137 64 168 33 35 77 38 128 166 159 151 78 3 155 34 6 140 16 133 26 117 13 143 144 150 7 131 64 61 162 52 149 16 17 80 136 77 141 83 54 146 85 47 140 24 107 158 91 152 66 43 24 21 86 38 141 85 51 11 162 151 2 66 73 74 9 26 156 68 121 1...
output:
72517498
result:
wrong answer 1st lines differ - expected: '83894725', found: '72517498'
Subtask #9:
score: 0
Skipped
Dependency #8:
0%
Subtask #10:
score: 0
Skipped
Dependency #9:
0%
Subtask #11:
score: 0
Skipped
Dependency #10:
0%