fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5. struct Knap
  6. {
  7. unsigned int a;
  8. unsigned int b;
  9. };
  10.  
  11. int main()
  12. {
  13. unsigned size, pyramids, vertex, sum = 0;
  14. Knap temp;
  15. std::cin >> size;
  16. ++size;
  17. std::cin >> pyramids;
  18. std::vector<std::vector<int> > board;
  19. board.resize(size, std::vector<int>(size, false));
  20. for (int i = 0; i < pyramids; ++i)
  21. {
  22. std::cin >> temp.a;
  23. std::cin >> temp.b;
  24. std::cin >> vertex;
  25. board[temp.a][temp.b] = vertex + 1;
  26. }
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 4408KB
stdin
5 2
2 1 1
2 2 2
stdout
Standard output is empty