Submission #617467

# Submission time Handle Problem Language Result Execution time Memory
617467 2022-08-01T11:36:10 Z AbdelmagedNour Ancient Books (IOI17_books) C++17
0 / 100
1 ms 340 KB
#include<bits/stdc++.h>
using namespace std;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
tree<int,null_type,greater<int>,rb_tree_tag,tree_order_statistics_node_update>st;
#include "books.h"
//#include"grader.cpp"
long long minimum_walk(vector<int> p, int s) {
    st.clear();
    long long res=0,mx=0;
    for(auto&x:p){
        int temp=2*st.order_of_key(x);
        if(temp)mx=max(mx,1LL*x);
        res+=temp;
        st.insert(x);
    }
    res+=mx*2;
	return res;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 340 KB 3rd lines differ - on the 1st token, expected: '6', found: '10'
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 340 KB 3rd lines differ - on the 1st token, expected: '6', found: '10'
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 340 KB 3rd lines differ - on the 1st token, expected: '6', found: '10'
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB 3rd lines differ - on the 1st token, expected: '3304', found: '6860'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 340 KB 3rd lines differ - on the 1st token, expected: '6', found: '10'
3 Halted 0 ms 0 KB -