yoyo106

Untitled

Oct 18th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include<iostream>
  2. #include<set>
  3. #include<unordered_set>
  4. #include<map>
  5. #include<unordered_map>
  6. #include<vector>
  7. #include<string>
  8. #include<stack>
  9. #include<queue>
  10. using namespace std;
  11.  
  12. /*
  13. 1. verify you understood the question and ask if you have any questions
  14. 2. idea
  15. 3. verify the idea
  16. 4. write the code
  17. 5. verify the code
  18.  
  19.  
  20. */
  21.  
  22.  
  23. void print(int n){
  24. auto ret = spiral(n);
  25. for(auto a : ret){
  26. for(int x : a)
  27. cout<<x<<" ";
  28. cout<<endl;
  29. }
  30. cout<<"__________________"<<endl;
  31. }
  32.  
  33.  
  34. // https://leetcode.com/problems/pacific-atlantic-water-flow/
  35.  
  36. int main()
  37. {
  38.  
  39.  
  40. //print(0);
  41. print(1);
  42. print(2);
  43. print(3);
  44. print(4);
  45. return 0;
  46. }
  47.  
Add Comment
Please, Sign In to add comment