제출 #1236886

#제출 시각아이디문제언어결과실행 시간메모리
1236886guanexPrize (CEOI22_prize)C++17
0 / 100
136 ms12828 KiB
#include<bits/stdc++.h> using namespace std; typedef vector<int> vi; //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; vi 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; cout<<flush; fflush(stdout); 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 vector<int> ans; for(int i = 0; i < t; ++i){ int u, v; cin >> u >> v; u--; v--; ans.push_back(0); } for(auto e:ans){ cout << e << ' ' << e << endl; } cout << endl; cout<<flush; fflush(stdout); } int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; while(t--){ 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...