Submission #956434

# Submission time Handle Problem Language Result Execution time Memory
956434 2024-04-01T21:32:11 Z nigus Minerals (JOI19_minerals) C++14
6 / 100
4 ms 344 KB
#include <bits/stdc++.h>
#include "minerals.h"

using namespace std;

void Solve(int N)
{   
    int n = N;
    vector<int> done(2*n, 0);
    for(int c1 = 0; c1 < 2*n; c1++){
        if(done[c1] == 0){
            Query(c1+1);
            for(int c2 = c1+1; c2 < 2*n; c2++){
                if(done[c2] == 0){
                    int temp = Query(c2+1);
                    if(temp == 1){
                        Answer(c1+1,c2+1);
                        done[c1] = 1;
                        done[c2] = 1;
                    }
                    Query(c2+1);
                    if(done[c1] == 1)break;
                }
            }
            Query(c1+1);
        }
    }
}
# 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 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 4 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 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 4 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 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 4 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 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 4 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 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 4 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 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 4 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 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 4 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 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Incorrect 4 ms 344 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -