답안 #1016222

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1016222 2024-07-07T14:13:22 Z walizamanee Super Dango Maker (JOI22_dango3) C++17
0 / 100
158 ms 852 KB
#include "dango3.h"
#include<bits/stdc++.h>

using namespace std;

//int Query(vector<int> hehe);
//int Answer( vector<int> lmao );
void Solve(int N, int M) {
   vector<vector<int>> uttor;
   uttor.clear();
   vector<int> one;
   for( int z = 0; z < N * M; z++ ) one.push_back(z + 1);
   for( int z = 0; z < M; z++ ) {
       vector<int> ans;
      // vector<int> one = arr;
       ans.clear();
       //ans.push_back(one[one.size() - 1]);
      // one.pop_back();
       int siz = (int)one.size();
       while( (int)ans.size() != N ) {
           long long ek = rand();
           long long dui = rand();
           long long lo = ( ek * dui)  % (long long)( siz );
           int lol = (int)lo;
           int bruh = one[lol];
           one.erase(one.begin() + lol);
           int an = Query(one);
           if( an != (M - z) + 1 ) one.push_back(bruh);
           else ans.push_back(bruh);
           siz--;
       }
       uttor.push_back(ans); 
   }
   for( int z = 0; z < M; z++ ) Answer( uttor[z] );
}

/*int main() {
   for( int z = 0; z < 10; z++ ) cout << rand() << " ";
   
} */



# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 2 ms 604 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 38 ms 596 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 158 ms 852 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -