답안 #998464

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
998464 2024-06-14T02:36:01 Z efishel Super Dango Maker (JOI22_dango3) C++17
2 / 100
2337 ms 608 KB
#include "dango3.h"
//Emmanuel B
//dango




#include <bits/stdc++.h>
using namespace std;
using lli=int;
#define pb push_back
#define deb(x) cout<<#x<<": "<<x<<endl;
#define deb2(x,y) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;

void Solve(int N, int M) {
  vector<bool> visited (N*M+5,0);
  vector<vector<lli>> ans;
  for(lli xd=1; xd<=N*M; ++xd){
    if(visited[xd]) continue;
    ans.pb({xd});
     lli last=xd;
     visited[last]=true;
  for(lli i=1; i<=N*M; ++i){
    if(visited[i]) continue;
    vector<int> x;
    for(int j=1; j<=N*M; ++j){
      if(j==last || j==i) continue;
      x.pb(j);
    }
    int a=Query(x);
    if(a!=M-1){
      ans[ans.size()-1].pb(i);
      visited[i]=true;
    }
  }
  }
  
  for(lli i=0; i<M; ++i){
    vector<lli> x;
    for(lli j=0; j<N; ++j){
      x.pb(ans[j][i]);
    }
    Answer(x);
  }
 
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 153 ms 348 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1178 ms 544 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2337 ms 608 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -