# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
18872 |
2016-02-16T06:48:27 Z |
guswns0528 |
공장 (KOI13_factory) |
C++14 |
|
2 ms |
5616 KB |
#include <iostream>
#include <vector>
int main(void)
{
std::cin.sync_with_stdio(false);
std::vector<int> map(1000001);
int n;
std::cin >> n;
auto result = 0;
for (auto index = 0; index < n; index++)
{
int number;
std::cin >> number;
map[number] = index;
}
for (auto index = 0; index < n; index++)
{
int number;
std::cin >> number;
result += std::abs(index - map[number]);
}
result /= 2;
std::cout << result << std::endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
5616 KB |
Output is correct |
2 |
Correct |
2 ms |
5616 KB |
Output is correct |
3 |
Incorrect |
0 ms |
5616 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
5616 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
5616 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
5616 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
5616 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |