Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cassert>
- #include <algorithm>
- #include <vector>
- #include <unordered_map>
- #include "optimization.h"
- #include <map>
- #include <unordered_set>
- #define all(a) a.begin, a.end()
- using namespace std;
- int main(){
- int v = readInt();
- int e = readInt();
- // cin >> v >> e;
- vector<vector<bool>> matrix(v, vector<bool> (e, false));
- for (int i = 0; i < e; i++){
- int a,b;
- // cin >> a >> b;
- a = readInt();
- b= readInt();
- matrix[a-1][i] = true;
- matrix[b-1][i] = true;
- }
- for (auto x: matrix){
- for (auto v:x){
- // cout << v << " ";
- int a = 0;
- if (v){
- a = 1;
- }
- writeInt(a, ' ');
- }
- writeChar('\n');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement