Language: C++

#include<stdio.h>
#include <iostream>
#include <string.h>
 
using namespace std;
 
typedef struct{
    char name[11];
    int time;
}Process;
 
class ProcessQueue{
public:
    ProcessQueue(int size):
        m_size(size),
        m_head(0),
        m_tail(0),
        number(0)
    {
        m_process = new Process[m_size];
    };
 
    ~ProcessQueue(){
        delete[] m_process;
    };
 
    void enQueue(Process process){
        //strcpy(m_process[m_tail].name,process.name);
        //m_process[m_tail].time = process.time;
 
        m_process[m_tail] = process;    //=??§??£??\????
 
        number++;
 
        if(m_tail < m_size-1){
            m_tail++;
        }else{  //?????°?????????
            m_tail = 0;
        }
    };
 
    Process deQueue(){
        number--;
        if(m_head < m_size-1){
            m_head++;
            return m_process[m_head-1];
        }else{  //?????°?????????
            m_head = 0;
            return m_process[m_size-1];
        }
    };
 
    int getNumber(){
        return number;
    }
 
private:
    int m_head;
    int m_tail;
    int m_size;
    int number;
    Process* m_process;
 
};
 
int main(){
 
    int n,q,totaltime=0;
    scanf("%d%d",&n,&q);
 
    ProcessQueue queue(n);
 
    Process tmp;
    for(int i = 0; i < n; i++){
        scanf("%s%d",&tmp.name,&tmp.time);
        queue.enQueue(tmp);
    }
 
    while(queue.getNumber() != 0){
        tmp = queue.deQueue();
        if(tmp.time - q > 0){
            totaltime += q;
            tmp.time -= q;
            queue.enQueue(tmp);
        }else{
            totaltime += tmp.time;
            printf("%s %d\n",tmp.name,totaltime);
        }
    }
 
}

Compile Error Logs:

ステータス
Judge: 10/10	C++	CPU: 00:01 sec	Memory: 1792 KB	Length: 1373 B	2016-08-05 18:21
テストケースの判定結果
Case #	Verdict	CPU Time	Memory	In	Out	Case Name
Case #1	: Accepted	00:00	1188	39	35	testcase_00
Case #2	: Accepted	00:00	1188	13	7	testcase_01
Case #3	: Accepted	00:00	1188	20	16	testcase_02
Case #4	: Accepted	00:00	1188	60	62	testcase_03
Case #5	: Accepted	00:00	1188	990	1181	testcase_04
Case #6	: Accepted	00:00	1188	989	1181	testcase_05
Case #7	: Accepted	00:00	1188	992	1165	testcase_06
Case #8	: Accepted	00:00	1188	991	1174	testcase_07
Case #9	: Accepted	00:00	1204	10788	13767	testcase_08
Case #10	: Accepted	00:01	1792	438916	631439	testcase_09

< prev |		/		| next >	 		
 
Judge Input #  ( | )		Judge Output #  ( | )



Compiler output:
a.cc:96:78: error: invalid digit "8" in octal constant
   96 | Judge: 10/10    C++     CPU: 00:01 sec  Memory: 1792 KB Length: 1373 B  2016-08-05 18:21
      |                                                                              ^~
a.cc:98:6: error: stray '#' in program
   98 | Case #  Verdict CPU Time        Memory  In      Out     Case Name
      |      ^
a.cc:99:6: error: stray '#' in program
   99 | Case #1 : Accepted      00:00   1188    39      35      testcase_00
      |      ^
a.cc:100:6: error: stray '#' in program
  100 | Case #2 : Accepted      00:00   1188    13      7       testcase_01
      |      ^
a.cc:101:6: error: stray '#' in program
  101 | Case #3 : Accepted      00:00   1188    20      16      testcase_02
      |      ^
a.cc:102:6: error: stray '#' in program
  102 | Case #4 : Accepted      00:00   1188    60      62      testcase_03
      |      ^
a.cc:103:6: error: stray '#' in program
  103 | Case #5 : Accepted      00:00   1188    990     1181    testcase_04
      |      ^
a.cc:104:6: error: stray '#' in program
  104 | Case #6 : Accepted      00:00   1188    989     1181    testcase_05
      |      ^
a.cc:105:6: error: stray '#' in program
  105 | Case #7 : Accepted      00:00   1188    992     1165    testcase_06
      |      ^
a.cc:106:6: error: stray '#' in program
  106 | Case #8 : Accepted      00:00   1188    991     1174    testcase_07
      |      ^
a.cc:107:6: error: stray '#' in program
  107 | Case #9 : Accepted      00:00   1204    10788   13767   testcase_08
      |      ^
a.cc:108:6: error: stray '#' in program
  108 | Case #10        : Accepted      00:01   1792    438916  631439  testcase_09
      |      ^
a.cc:112:13: error: stray '#' in program
  112 | Judge Input #  ( | )            Judge Output #  ( | )
      |             ^
a.cc:112:46: error: stray '#' in program
  112 | Judge Input #  ( | )            Judge Output #  ( | )
      |                                              ^
a.cc:93:1: error: 'Compile' does not name a type
   93 | Compile Error Logs:
      | ^~~~~~~