Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- const int NMAX = 99999;
- int x[NMAX], y[NMAX], n;
- ifstream f("proiect_domino.in");
- void input(){
- f >> n;
- for(int i = 0; i < n; ++i) f >> x[i];
- for(int i = 0; i < n; ++i) f >> y[i];
- f.close();
- }
- void dynamic(){
- for(int i = 0; i < n - 1; ++i){
- for(int j = i + 1; i < n; ++j){
- if(x[i] == y[j]) cout << x[i]<< " " << y[j] << "\n";
- }
- }
- }
- int main()
- {
- input();
- dynamic();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement