Submission #1236854

#TimeUsernameProblemLanguageResultExecution timeMemory
1236854guanexPrize (CEOI22_prize)C++20
0 / 100
398 ms8288 KiB
#include<bits/stdc++.h> using namespace std; //mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); //high quality random number generator using time as seed //int random(int l, int r){return uniform_int_distribution<int>(l,r)(rng);} //returns a randomb number between [l, r] // Solution void tc(){ int n, k, q, t; cin >> n >> k >> q >> t; vector<int> a(n), b(n); for(int i = 0; i < n; ++i){ cin >> a[i]; } for(int i = 0; i < n; ++i){ cin >>b[i]; } //vvi eda(n); //vi rootdist(n); //rootdist[0] = 0; //vi da(n); for(int i = 0; i < k; ++i){ cout << i+1 << " "; } cout << '\n'; for(int i = 1; i < k; ++i){ cout << "? " << 1 << " " << i+1 << '\n'; } cout << "!" << endl; for(int i = 1; i < k; ++i){ int e, f, g, h; cin >> e >> f >> g >> h; //rootdist[i] = e; // calculates all distance from root on the first tree(the joint one) //setree.join(u, v, g, h, stb); //uses graph structure to create the lca tree from the second tree, join erase a big edge, add a node, and join 2 small edges to the initial points } //setree.create(); //crate sum sparse table for(int i = 0; i < t; ++i){ int u, v; cin >> u >> v; u--; v--; cout << "0 0"; cout << '\n'; } cout << endl; } int main(){ tc(); }
#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...