Submission #296184

# Submission time Handle Problem Language Result Execution time Memory
296184 2020-09-10T11:45:50 Z BThero Park (JOI17_park) C++17
10 / 100
76 ms 384 KB
// chrono::system_clock::now().time_since_epoch().count()
#include "park.h"
#include<bits/stdc++.h>

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define debug(x) cerr << #x << " = " << x << endl;

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

namespace {
  int subtask_no, n;
  
  bool ask(int a, int b, vector<int> &vec) {
    if (a > b) {
      swap(a, b);
    }
  
    int tmp[n];
    fill(tmp, tmp + n, 0);
    
    for (int x : vec) {
      tmp[x] = 1;
    }
    
    return Ask(a, b, tmp);
  }
  
  void report(int a, int b) {
    Answer(a, b);
  }
  
  void solve() {
    for (int a = 0; a < n; ++a) {
      for (int b = a + 1; b < n; ++b) {
        vector<int> S;
        S.pb(a);
        S.pb(b);
      
        if (ask(a, b, S)) {
          report(a, b);
        }
      }
    }
  }
};

void Detect(int T, int N) {
  subtask_no = T;
  n = N;
  solve();
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 13 ms 384 KB Output is correct
3 Correct 13 ms 384 KB Output is correct
4 Correct 13 ms 384 KB Output is correct
5 Correct 13 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 76 ms 384 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 69 ms 384 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 51 ms 384 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 68 ms 384 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -