QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#616731 | #8637. 搬砖 | helloworld | 50 | 5ms | 3708kb | C++14 | 862b | 2024-10-06 10:48:56 | 2024-10-06 10:48:56 |
Judging History
answer
# include <iostream>
# include <cstdio>
# include <cmath>
# include <algorithm>
# include <cstring>
# include <vector>
# include <map>
# include <queue>
# define int long long
# define st first
# define nd second
using namespace std;
const int MAXN = 5e3 + 10, PR = 998244353;
int n, a[MAXN], b[MAXN], cnt[MAXN];
signed main() {
cin >> n;
for (int i = 1; i <= n; i++) cin >> a[i];
int ans = 0;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= a[i]; j++) {
for (int k = 1; k <= 100; k++) cnt[k] = 0;
for (int k = 1; k <= n; k++) b[k] = a[k];
b[i] -= j;
for (int k = 1; k <= n; k++) b[k] /= j;
for (int k = 1; k <= n; k++) {
cnt[b[k]]++;
}
bool flag = 0;
for (int k = 1; k <= 100; k++) {
if (cnt[k] % 2 == 1) flag = 1;
}
if (!flag) ans++;
}
}
cout << ans << endl ;
return 0;
}
详细
Subtask #1:
score: 50
Accepted
Test #1:
score: 50
Accepted
time: 1ms
memory: 3600kb
input:
19 49 87 55 72 26 28 61 89 3 74 68 5 35 38 29 51 43 50 99
output:
164
result:
ok 1 number(s): "164"
Test #2:
score: 50
Accepted
time: 1ms
memory: 3580kb
input:
39 49 87 55 72 26 28 61 89 3 74 68 5 35 38 29 51 43 50 99 71 56 92 89 16 45 58 25 88 26 93 41 26 79 96 50 57 75 10 45
output:
453
result:
ok 1 number(s): "453"
Test #3:
score: 50
Accepted
time: 1ms
memory: 3552kb
input:
51 49 87 55 72 26 28 61 89 3 74 68 5 35 38 29 51 43 50 99 71 56 92 89 16 45 58 25 88 26 93 41 26 79 96 50 57 75 10 45 77 35 64 81 70 2 9 20 96 10 70 67
output:
459
result:
ok 1 number(s): "459"
Test #4:
score: 50
Accepted
time: 2ms
memory: 3612kb
input:
79 49 87 55 72 26 28 61 89 3 74 68 5 35 38 29 51 43 50 99 71 56 92 89 16 45 58 25 88 26 93 41 26 79 96 50 57 75 10 45 77 35 64 81 70 2 9 20 96 10 70 67 66 62 7 81 6 17 5 45 42 97 85 67 27 80 16 83 54 77 80 82 12 95 62 33 48 70 4 44
output:
822
result:
ok 1 number(s): "822"
Test #5:
score: 50
Accepted
time: 3ms
memory: 3708kb
input:
99 49 87 55 72 26 28 61 89 3 74 68 5 35 38 29 51 43 50 99 71 56 92 89 16 45 58 25 88 26 93 41 26 79 96 50 57 75 10 45 77 35 64 81 70 2 9 20 96 10 70 67 66 62 7 81 6 17 5 45 42 97 85 67 27 80 16 83 54 77 80 82 12 95 62 33 48 70 4 44 80 73 62 97 86 20 77 43 36 33 87 29 81 72 48 7 3 15 42 57
output:
1094
result:
ok 1 number(s): "1094"
Test #6:
score: 50
Accepted
time: 1ms
memory: 3580kb
input:
51 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
output:
201
result:
ok 1 number(s): "201"
Test #7:
score: 50
Accepted
time: 1ms
memory: 3612kb
input:
51 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 40 40 40 40 40 40 40 40 40 40
output:
271
result:
ok 1 number(s): "271"
Test #8:
score: 50
Accepted
time: 1ms
memory: 3604kb
input:
51 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 41 42 43 44 45 46 47 48 49 50 51
output:
257
result:
ok 1 number(s): "257"
Test #9:
score: 50
Accepted
time: 1ms
memory: 3684kb
input:
51 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 41 42 43 44 45 46 47 48 49 50 51
output:
257
result:
ok 1 number(s): "257"
Test #10:
score: 50
Accepted
time: 1ms
memory: 3708kb
input:
51 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 41 42 43 44 45 46 47 48 49 50 51
output:
257
result:
ok 1 number(s): "257"
Test #11:
score: 50
Accepted
time: 2ms
memory: 3544kb
input:
99 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 52 57 53 53
output:
4010
result:
ok 1 number(s): "4010"
Test #12:
score: 50
Accepted
time: 5ms
memory: 3628kb
input:
99 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 52 57 53 53
output:
4010
result:
ok 1 number(s): "4010"
Test #13:
score: 50
Accepted
time: 5ms
memory: 3616kb
input:
99 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 52 57 53 53
output:
4010
result:
ok 1 number(s): "4010"
Test #14:
score: 50
Accepted
time: 2ms
memory: 3704kb
input:
99 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 52 57 53 53
output:
4010
result:
ok 1 number(s): "4010"
Test #15:
score: 50
Accepted
time: 5ms
memory: 3552kb
input:
99 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 52 57 53 53
output:
4010
result:
ok 1 number(s): "4010"
Test #16:
score: 50
Accepted
time: 1ms
memory: 3612kb
input:
39 51 49 51 50 50 49 18 17 16 17 18 16 62 61 62 62 62 61 7 8 9 7 9 8 31 31 31 31 33 31 2 2 3 3 3 3 1 2 1
output:
31
result:
ok 1 number(s): "31"
Test #17:
score: 50
Accepted
time: 1ms
memory: 3700kb
input:
39 51 49 51 50 50 49 18 17 16 17 18 16 62 61 62 62 62 61 7 8 9 7 9 8 31 31 31 31 33 31 2 2 3 3 3 3 1 2 1
output:
31
result:
ok 1 number(s): "31"
Test #18:
score: 50
Accepted
time: 1ms
memory: 3552kb
input:
39 51 49 51 50 50 49 18 17 16 17 18 16 62 61 62 62 62 61 7 8 9 7 9 8 31 31 31 31 33 31 2 2 3 3 3 3 1 2 1
output:
31
result:
ok 1 number(s): "31"
Test #19:
score: 50
Accepted
time: 1ms
memory: 3572kb
input:
39 51 49 51 50 50 49 18 17 16 17 18 16 62 61 62 62 62 61 7 8 9 7 9 8 31 31 31 31 33 31 2 2 3 3 3 3 1 2 1
output:
31
result:
ok 1 number(s): "31"
Test #20:
score: 50
Accepted
time: 1ms
memory: 3704kb
input:
39 51 49 51 50 50 49 18 17 16 17 18 16 62 61 62 62 62 61 7 8 9 7 9 8 31 31 31 31 33 31 2 2 3 3 3 3 1 2 1
output:
31
result:
ok 1 number(s): "31"
Subtask #2:
score: 0
Runtime Error
Test #21:
score: 0
Runtime Error
input:
199999 847249 186487 367355 618072 937226 591328 776261 362189 96203 363974 349368 378905 615535 753238 551029 549551 648843 257850 897199 780171 34956 529292 138489 164016 983045 678158 447625 770688 359626 620193 47041 723226 806679 414396 857650 260257 522075 633910 622445 618277 514235 488164 99...