QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#210172 | #6348. Egor Has a Problem | rootcucu | RE | 0ms | 3740kb | C++17 | 767b | 2023-10-11 05:26:50 | 2023-10-11 05:26:50 |
Judging History
answer
#include <iostream>
using namespace std;
int main(void){
ios::sync_with_stdio(0); cin.tie(0);
int n; cin >> n;
n = min(100, n);
int a[101];
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int i = 1; i <= n; i++)
for (int j = i + 1; j <= n; j++)
for (int p = j + 1; p <= n; p++)
for (int q = p + 1 ; q <= n; q++){
if (a[q] / a[p] == a[j] / a[i]){
cout << "YES\n";
cout << i << " ";
cout << j << " ";
cout << p << " ";
cout << q << "\n";
return 0;
}
}
cout << "NO\n";
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3740kb
input:
6 2 6 11 21 47 120
output:
YES 1 3 4 6
result:
ok OK
Test #2:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
5 1 2 6 30 210
output:
NO
result:
ok OK
Test #3:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
4 7 13 77 143
output:
YES 1 2 3 4
result:
ok OK
Test #4:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
4 10 29 31 100
output:
NO
result:
ok OK
Test #5:
score: -100
Runtime Error
input:
500000 627045176858 4817409059014 6288122580263 11138485427254 14292718094002 14799874839768 16926890883539 17617152313162 17645472255619 18208915248631 22963632241827 24466999302606 25551903318615 26091633648017 38200644379849 39885775205129 40036378248650 40309675851194 40773414900416 408933438176...