Submission #939792

# Submission time Handle Problem Language Result Execution time Memory
939792 2024-03-06T18:55:32 Z AdamGS Lockpicking (IOI23_lockpicking) C++17
0 / 100
1000 ms 348 KB
#include "lockpicking.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
void construct_card(int N, vector<int>A, vector<vector<int>>S) {
  vector<int>B=A;
  vector<vector<int>>T=S;
  int k=1;
  vector<int>odw(N);
  for(int i=1; i<N; ++i) {
    int p=i, s=0;
    while(p!=s%N) {
      if(A[p]!=B[s] && !odw[s]) {
        rep(j, N) {
          B.pb(A[j]);
          T.pb({S[j][0]+k*N, S[j][1]+k*N});
        }
        T[s][A[p]]=S[p][B[s]]+k*N;
        ++k;
      }
      int x=A[p], y=B[s];
      p=S[p][y];
      s=T[s][x];
    }
  }
  define_states(N*k, B, T, 0);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB ok, most errors: 1 (allowed: 1)
2 Execution timed out 1065 ms 348 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1032 ms 344 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1067 ms 344 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB ok, most errors: 1 (allowed: 1)
2 Execution timed out 1065 ms 348 KB Time limit exceeded
3 Halted 0 ms 0 KB -