Submission #909804

# Submission time Handle Problem Language Result Execution time Memory
909804 2024-01-17T12:39:10 Z guechotjrhh Minerals (JOI19_minerals) C++14
6 / 100
6 ms 344 KB
#include "minerals.h"
#include<vector>
#include<set>
using namespace std;

int n, s;
void Solve(int N) {
    n = N; s = n << 1;
    set<int> st;
    for (int i = 1; i <= s; i++) st.insert(i);
    while (st.size()) {
        int u = *st.begin();
        Query(u);
        st.erase(st.begin());
        for (int j : st) {
            int z = Query(j);
            Query(j);
            if (z == 1) {
                Answer(j, u);
                Query(u);
                st.erase(st.find(j));
                break;
            }
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 344 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 6 ms 344 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 6 ms 344 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 6 ms 344 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 6 ms 344 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 6 ms 344 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 6 ms 344 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 6 ms 344 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -