Algo lab/templates/icecream1

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
#include <iostream>
using namespace std;

int main()
{
  int m;

  cin >> m;
  for (int i = 0; i < m; ++i) {
    int t;

    cin >> t;
    if (t == 1) {
      int n;
      cin >> n;
      // your code here
    } else {
      // here, t = 2.  Call someone to the queue.
    }
  }

  // you have to print the number of remaining customers as well.
  // iterate the rest of the list here...
  
}