답안 #909804

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
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;
            }
        }
    }
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 Grader output
1 Incorrect 6 ms 344 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -