답안 #1072674

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1072674 2024-08-24T02:26:02 Z boyliguanhan Minerals (JOI19_minerals) C++17
40 / 100
22 ms 3344 KB
#include "minerals.h"
#include<bits/stdc++.h>
using namespace std;
void solve(vector<int>A,vector<int>B,int dep){
  if(A.size()==1) return Answer(A[0],B[0]);
  vector<int>A1,A2;
  vector<int>B1,B2;
  for(auto i:A)
    A1.push_back(i),swap(A1,A2);
  int prv=0;
  for(auto i:A1)
    prv=Query(i);
  for(auto i:B) {
    int x=Query(i);
    if(x!=prv)
      B2.push_back(i);
    else B1.push_back(i);
    prv=x;
  }
  for(auto i:A1)
    Query(i);
  solve(A1,B1,dep^1);
  solve(A2,B2,dep^1);
}
void Solve(int N) {
  vector<int>A,B;
  int prv=0;
  for(int i=1;i<=2*N;i++)
    if(Query(i)!=prv)
      A.push_back(i),prv++;
    else B.push_back(i);
  for(int i=1;i<=2*N;i++)
    Query(i);
  solve(A,B,0);
}
# 결과 실행 시간 메모리 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 0 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 2 ms 600 KB Output is correct
4 Correct 5 ms 756 KB Output is correct
5 Correct 12 ms 1296 KB Output is correct
# 결과 실행 시간 메모리 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 0 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 5 ms 756 KB Output is correct
9 Correct 12 ms 1296 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 6 ms 1112 KB Output is correct
12 Correct 10 ms 1368 KB Output is correct
13 Correct 9 ms 1368 KB Output is correct
14 Correct 9 ms 1368 KB Output is correct
# 결과 실행 시간 메모리 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 0 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 5 ms 756 KB Output is correct
9 Correct 12 ms 1296 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 6 ms 1112 KB Output is correct
12 Correct 10 ms 1368 KB Output is correct
13 Correct 9 ms 1368 KB Output is correct
14 Correct 9 ms 1368 KB Output is correct
15 Incorrect 22 ms 3344 KB Wrong Answer [2]
16 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 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 5 ms 756 KB Output is correct
9 Correct 12 ms 1296 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 6 ms 1112 KB Output is correct
12 Correct 10 ms 1368 KB Output is correct
13 Correct 9 ms 1368 KB Output is correct
14 Correct 9 ms 1368 KB Output is correct
15 Incorrect 22 ms 3344 KB Wrong Answer [2]
16 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 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 5 ms 756 KB Output is correct
9 Correct 12 ms 1296 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 6 ms 1112 KB Output is correct
12 Correct 10 ms 1368 KB Output is correct
13 Correct 9 ms 1368 KB Output is correct
14 Correct 9 ms 1368 KB Output is correct
15 Incorrect 22 ms 3344 KB Wrong Answer [2]
16 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 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 5 ms 756 KB Output is correct
9 Correct 12 ms 1296 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 6 ms 1112 KB Output is correct
12 Correct 10 ms 1368 KB Output is correct
13 Correct 9 ms 1368 KB Output is correct
14 Correct 9 ms 1368 KB Output is correct
15 Incorrect 22 ms 3344 KB Wrong Answer [2]
16 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 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 5 ms 756 KB Output is correct
9 Correct 12 ms 1296 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 6 ms 1112 KB Output is correct
12 Correct 10 ms 1368 KB Output is correct
13 Correct 9 ms 1368 KB Output is correct
14 Correct 9 ms 1368 KB Output is correct
15 Incorrect 22 ms 3344 KB Wrong Answer [2]
16 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 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 5 ms 756 KB Output is correct
9 Correct 12 ms 1296 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 6 ms 1112 KB Output is correct
12 Correct 10 ms 1368 KB Output is correct
13 Correct 9 ms 1368 KB Output is correct
14 Correct 9 ms 1368 KB Output is correct
15 Incorrect 22 ms 3344 KB Wrong Answer [2]
16 Halted 0 ms 0 KB -