ErnestGalbrun

Untitled

Dec 5th, 2021
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. vector<long long> h(9,0);
  2. for(auto i: in) {
  3.     h[i]++;
  4. }
  5.  
  6. for (auto t = 0; t< 256; ++t){
  7.     auto d = h[0];
  8.     h.erase(h.begin());
  9.     h.push_back(d);
  10.     h[6] += d;
  11. }
  12.  
  13. cout << absl::c_accumulate(h, 0) << endl;
Advertisement
Add Comment
Please, Sign In to add comment