Submission #383666

# Submission time Handle Problem Language Result Execution time Memory
383666 2021-03-30T13:39:50 Z aris12345678 Wiring (IOI17_wiring) C++14
0 / 100
22 ms 2924 KB
#include "wiring.h"
#include <bits/stdc++.h>
using namespace std;

#define int64 long long

const int mxN = 1e6+5;

int64 min_total_length(vector<int> r, vector<int> b) {
    int i = r.size()-1, j = b.size()-1;
    int64 ans = 0;
    while(i >= 0 && j >= 0)
        ans += (b[j]-r[i]), i--, j--;
    while(i >= 0)
        ans += (b[0]-r[i]), i--;
    while(j >= 0)
        ans += (b[j]-r[0]), j--;
    return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 364 KB 3rd lines differ - on the 1st token, expected: '25859', found: '-4909'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 21 ms 2924 KB Output is correct
4 Correct 22 ms 2924 KB Output is correct
5 Incorrect 22 ms 2924 KB 3rd lines differ - on the 1st token, expected: '41752125325332', found: '58371613628139'
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Incorrect 1 ms 364 KB 3rd lines differ - on the 1st token, expected: '17703', found: '-19052'
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB 3rd lines differ - on the 1st token, expected: '27', found: '12'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 364 KB 3rd lines differ - on the 1st token, expected: '25859', found: '-4909'
2 Halted 0 ms 0 KB -