Submission #812629

#TimeUsernameProblemLanguageResultExecution timeMemory
812629QwertyPiShuffle (NOI19_shuffle)C++14
0 / 100
1 ms340 KiB
#ifndef EVEL #include "shuffle.h" #endif #include <bits/stdc++.h> using namespace std; std::vector< std::vector<int> > shuffle(std::vector< std::vector<int> > packed_cards); vector<int> solve(int N, int B, int K, int Q, int ST) { std::vector< std::vector<int> > cards(B, std::vector<int>(K)); for(int i = 0; i < B; i++) for(int j = 0; j < K; j++) cards[i][j] = i * K + j + 1; std::vector< std::vector<int> > v2 = shuffle(cards); std::vector<int> ans; for(int i = 0; i < N; i++) ans.push_back(i + 1); return ans; } #ifdef EVEL std::vector< std::vector<int> > shuffle(std::vector< std::vector<int> > packed_cards){ int B = packed_cards.size(), K = packed_cards[0].size(); std::cout << "Q "; for (int i = 0; i < B; i++) { for(int j = 0; j < K; j++){ std::cout << packed_cards[i][j] << ' '; } } std::cout << std::endl; std::vector< std::vector<int> > res(B, std::vector<int>(K)); for (int i = 0; i < B; i++) { for(int j = 0; j < K; j++){ std::cin >> res[i][j]; } } return res; } int main() { std::ios::sync_with_stdio(false); int N, B, K, Q, ST; std::cin >> N >> B >> K >> Q >> ST; std::vector<int> order(N + 1); for (int i = 1; i <= N; i++) { std::cin >> order[i]; } vector<int> res = solve(N, B, K, Q, ST); std::cout << "A "; for (int i = 0; i < N; i++) { std::cout << res[i] << ' '; } std::cout << std::endl; } #endif
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...