#include "cross.h"
long long SelectCross(int K, std::vector<int> I, std::vector<int> O) {
int N = I.size();
long long maxsize = 0;
for(int i=0;i<N;i++){
long long now = (long long)O[i]*(long long)O[i] - ((long long)O[i]-(long long)I[i])*((long long)O[i]-(long long)I[i]);
maxsize = (maxsize>now)?maxsize:now;
}
return maxsize;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
384 KB |
Output is correct |
4 |
Correct |
6 ms |
384 KB |
Output is correct |
5 |
Correct |
12 ms |
640 KB |
Output is correct |
6 |
Correct |
84 ms |
3688 KB |
Output is correct |
7 |
Correct |
87 ms |
3564 KB |
Output is correct |
8 |
Correct |
86 ms |
3684 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
384 KB |
Output is correct |
4 |
Correct |
6 ms |
384 KB |
Output is correct |
5 |
Correct |
12 ms |
640 KB |
Output is correct |
6 |
Correct |
84 ms |
3688 KB |
Output is correct |
7 |
Correct |
87 ms |
3564 KB |
Output is correct |
8 |
Correct |
86 ms |
3684 KB |
Output is correct |
9 |
Incorrect |
5 ms |
384 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
384 KB |
Output is correct |
4 |
Correct |
6 ms |
384 KB |
Output is correct |
5 |
Correct |
12 ms |
640 KB |
Output is correct |
6 |
Correct |
84 ms |
3688 KB |
Output is correct |
7 |
Correct |
87 ms |
3564 KB |
Output is correct |
8 |
Correct |
86 ms |
3684 KB |
Output is correct |
9 |
Incorrect |
5 ms |
384 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |