QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#297656 | #5733. Speeding | jpark | AC ✓ | 1ms | 3660kb | C++14 | 321b | 2024-01-04 21:46:52 | 2024-01-04 21:46:53 |
Judging History
answer
#include<iostream>
using namespace std;
int main(){
int maxs = 0;
int n; cin >> n;
int prevt, prevd; cin >> prevt >> prevd;
for(int i=1; i<n; ++i){
int a,b; cin >> a >> b;
maxs = max(maxs, (b-prevd)/(a-prevt));
prevt = a;
prevd = b;
}
cout << maxs;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3504kb
input:
2 0 0 7 42
output:
6
result:
ok single line: '6'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
5 0 0 5 24 10 98 15 222 20 396
output:
34
result:
ok single line: '34'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
10 0 0 3178 106118 3586 168355 4279 208723 5775 486384 8357 558336 9229 794915 9384 886609 9700 889104 9837 998018
output:
794
result:
ok single line: '794'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3452kb
input:
100 0 0 220 8474 269 12863 383 14491 387 32919 437 44928 439 49663 530 49967 534 72112 612 96126 819 98560 856 106107 979 106717 1166 113577 1226 125241 1228 125704 1261 132163 1333 136461 1338 140137 1457 141090 1499 141930 1554 153428 1870 160264 1959 161818 2088 195459 2182 213048 2321 216332 232...
output:
5536
result:
ok single line: '5536'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
2 0 0 6569 312459
output:
47
result:
ok single line: '47'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
100 0 0 11 8382 99 23622 180 28338 283 31734 310 32927 401 49053 509 50620 822 59524 843 75760 989 82754 1143 84454 1145 87206 1374 87475 1627 99481 2113 104733 2201 108648 2251 113633 2485 122898 2611 135274 2653 155025 3249 185136 3274 185679 3282 199893 3334 214929 3500 215726 3612 232352 3639 25...
output:
5555
result:
ok single line: '5555'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
2 0 0 100 1000
output:
10
result:
ok single line: '10'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
2 0 0 100 1001
output:
10
result:
ok single line: '10'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
2 0 0 100 999
output:
9
result:
ok single line: '9'