Algo lab/templates/icecream1

จาก Theory Wiki
รุ่นแก้ไขเมื่อ 02:22, 26 สิงหาคม 2567 โดย Jittat (คุย | มีส่วนร่วม)
(ต่าง) ←รุ่นแก้ไขก่อนหน้า | รุ่นแก้ไขล่าสุด (ต่าง) | รุ่นแก้ไขถัดไป→ (ต่าง)
ไปยังการนำทาง ไปยังการค้นหา
#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...
  
}