답안 #199200

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
199200 2020-01-30T03:40:11 Z xiaowuc1 사육제 (CEOI14_carnival) C++17
20 / 100
91 ms 380 KB
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <vector>

using namespace std;

// BEGIN NO SAD
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
typedef vector<int> vi;
// END NO SAD

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

int ret[155];
int n;
void solve() {
  cin >> n;
  cout << n;
  for(int i = 1; i <= n; i++) {
    cout << " " << i;
  } cout << endl;
  int k;
  cin >> k;
  memset(ret, 1, sizeof(ret));
  int next = 1;
  for(int src = 1; src <= n; src++) {
    if(ret[src] <= k) continue;
    assert(next <= k);
    ret[src] = next;
    for(int dst = src+1; dst <= n; dst++) {
      if(ret[dst] <= k) continue;
      if(next == k) {
        ret[dst] = k;
        continue;
      }
      cout << 2 << " " << src << " " << dst << endl;
      int t;
      cin >> t;
      if(t == 1) ret[dst] = next;
    }
    next++;
  }
  cout << 0;
  for(int i = 1; i <= n; i++) cout << " " << ret[i];
  cout << endl;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL); cout.tie(NULL);
  solve();
}
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 248 KB Output is correct
2 Correct 23 ms 248 KB Output is correct
3 Partially correct 55 ms 376 KB Partially correct
4 Partially correct 62 ms 248 KB Partially correct
5 Correct 7 ms 248 KB Output is correct
6 Correct 6 ms 252 KB Output is correct
7 Correct 21 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 248 KB Output is correct
2 Correct 19 ms 248 KB Output is correct
3 Partially correct 37 ms 248 KB Partially correct
4 Partially correct 76 ms 248 KB Partially correct
5 Correct 7 ms 248 KB Output is correct
6 Correct 7 ms 376 KB Output is correct
7 Correct 12 ms 248 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 248 KB Output is correct
2 Correct 11 ms 376 KB Output is correct
3 Partially correct 42 ms 380 KB Partially correct
4 Partially correct 88 ms 248 KB Partially correct
5 Correct 10 ms 376 KB Output is correct
6 Correct 15 ms 248 KB Output is correct
7 Correct 30 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 376 KB Output is correct
2 Correct 10 ms 248 KB Output is correct
3 Partially correct 70 ms 376 KB Partially correct
4 Partially correct 54 ms 248 KB Partially correct
5 Correct 15 ms 248 KB Output is correct
6 Correct 32 ms 248 KB Output is correct
7 Correct 25 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 248 KB Output is correct
2 Correct 16 ms 376 KB Output is correct
3 Partially correct 50 ms 248 KB Partially correct
4 Partially correct 59 ms 376 KB Partially correct
5 Correct 28 ms 248 KB Output is correct
6 Partially correct 48 ms 248 KB Partially correct
7 Partially correct 91 ms 380 KB Partially correct