QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#742112#3130. Are They All Integers?vwxyz#AC ✓42ms10640kbPython3223b2024-11-13 15:53:382024-11-13 15:53:39

Judging History

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

  • [2024-11-13 15:53:39]
  • 评测
  • 测评结果:AC
  • 用时:42ms
  • 内存:10640kb
  • [2024-11-13 15:53:38]
  • 提交

answer

N=int(input())
A=list(map(int,input().split()))
ans="yes"
for i in range(N):
    for j in range(N):
        for k in range(N):
            if len({i,j,k})==3 and (A[i]-A[j])%A[k]:
                ans="no"
print(ans)

详细

Test #1:

score: 100
Accepted
time: 15ms
memory: 10508kb

input:

5
1 1 1 1 4

output:

yes

result:

ok single line: 'yes'

Test #2:

score: 0
Accepted
time: 5ms
memory: 10512kb

input:

5
1 2 4 8 16

output:

no

result:

ok single line: 'no'

Test #3:

score: 0
Accepted
time: 16ms
memory: 10628kb

input:

3
1 1 4

output:

yes

result:

ok single line: 'yes'

Test #4:

score: 0
Accepted
time: 42ms
memory: 10452kb

input:

50
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 96

output:

yes

result:

ok single line: 'yes'

Test #5:

score: 0
Accepted
time: 9ms
memory: 10636kb

input:

12
9 10 11 12 13 13 13 13 13 14 14 14

output:

no

result:

ok single line: 'no'

Test #6:

score: 0
Accepted
time: 16ms
memory: 10516kb

input:

7
9 9 9 9 9 9 99

output:

yes

result:

ok single line: 'yes'

Test #7:

score: 0
Accepted
time: 11ms
memory: 10580kb

input:

7
7 7 7 77 77 77 77

output:

no

result:

ok single line: 'no'

Test #8:

score: 0
Accepted
time: 16ms
memory: 10508kb

input:

5
1 1 1 99 100

output:

no

result:

ok single line: 'no'

Test #9:

score: 0
Accepted
time: 13ms
memory: 10568kb

input:

8
100 100 100 100 100 100 100 100

output:

yes

result:

ok single line: 'yes'

Test #10:

score: 0
Accepted
time: 16ms
memory: 10640kb

input:

5
1 1 1 1 4

output:

yes

result:

ok single line: 'yes'

Test #11:

score: 0
Accepted
time: 39ms
memory: 10572kb

input:

50
96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96

output:

yes

result:

ok single line: 'yes'

Test #12:

score: 0
Accepted
time: 15ms
memory: 10560kb

input:

3
32 64 96

output:

no

result:

ok single line: 'no'

Test #13:

score: 0
Accepted
time: 15ms
memory: 10636kb

input:

3
3 3 87

output:

yes

result:

ok single line: 'yes'

Test #14:

score: 0
Accepted
time: 32ms
memory: 10536kb

input:

50
2 5 9 10 12 14 14 15 17 17 18 18 18 19 20 23 24 26 27 27 27 33 34 37 45 47 47 49 50 53 56 61 62 63 65 66 67 70 76 80 82 85 87 90 90 91 98 98 99 99

output:

no

result:

ok single line: 'no'

Test #15:

score: 0
Accepted
time: 38ms
memory: 10512kb

input:

50
50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 100

output:

yes

result:

ok single line: 'yes'

Test #16:

score: 0
Accepted
time: 35ms
memory: 10568kb

input:

50
49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 97

output:

no

result:

ok single line: 'no'

Test #17:

score: 0
Accepted
time: 5ms
memory: 10536kb

input:

5
1 2 4 8 16

output:

no

result:

ok single line: 'no'