criyle/codenet-compile-errors huggingface dataset:
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct pp {
    char name[100];
    int i;
} P;

P Q[100];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a, int b){
    return a < b ? a :b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }
    
    head = 1;
    tail = n + 1;
    
    while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        
        if(u.t > 0){
            enqueue(u);
        }
        else{
            print("%s %d\n", u.name, elaps);
        }
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:36:26: error: 'P' {aka 'struct pp'} has no member named 't'
   36 |         scanf("%d", &Q[i].t);
      |                          ^
main.c:44:21: error: 'P' {aka 'struct pp'} has no member named 't'
   44 |         c = min(q, u.t);
      |                     ^
main.c:45:10: error: 'P' {aka 'struct pp'} has no member named 't'
   45 |         u.t -= c;
      |          ^
main.c:48:13: error: 'P' {aka 'struct pp'} has no member named 't'
   48 |         if(u.t > 0){
      |             ^
main.c:52:13: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   52 |             print("%s %d\n", u.name, elaps);
      |             ^~~~~
      |             printf
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct {
    char name[100];
    int i;
} P;

P Q[100];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a, int b){
    return a < b ? a :b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }
    
    head = 1;
    tail = n + 1;
    
    while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        
        if(u.t > 0){
            enqueue(u);
        }
        else{
            print("%s %d\n", u.name, elaps);
        }
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:36:26: error: 'P' has no member named 't'
   36 |         scanf("%d", &Q[i].t);
      |                          ^
main.c:44:21: error: 'P' has no member named 't'
   44 |         c = min(q, u.t);
      |                     ^
main.c:45:10: error: 'P' has no member named 't'
   45 |         u.t -= c;
      |          ^
main.c:48:13: error: 'P' has no member named 't'
   48 |         if(u.t > 0){
      |             ^
main.c:52:13: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   52 |             print("%s %d\n", u.name, elaps);
      |             ^~~~~
      |             printf
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct {
    char name[100];
    int t;
} P;

P Q[100];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a, int b){
    return a < b ? a :b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }
    
    head = 1;
    tail = n + 1;
    
    while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        
        if(u.t > 0){
            enqueue(u);
        }
        else{
            print("%s %d\n", u.name, elaps);
        }
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:52:13: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   52 |             print("%s %d\n", u.name, elaps);
      |             ^~~~~
      |             printf
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct {
    char name[100];
    int t;
} P;

P Q[100];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a, int b){
    return a < b ? a :b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }

　　head = 0;
    tail = n;

　　while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        
        if(u.t > 0){
            enqueue(u);
        }
        else{
            if(c>0){
                printf("%s %d\n", u.name, elaps);
            }
        }
    }
    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:39:1: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      | ^~~~~~~~
main.c:39:3: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      |         ^~~~~~~~
main.c:42:1: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:42:3: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct {
    char name[100];
    int t;
} P;

P Q[100];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a, int b){
    return a < b ? a :b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }

　　head = 0;
    tail = n;

　　while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        
        if(u.t > 0){
            enqueue(u);
        }
        else{
            if(c>0){
                printf("%s %d\n", u.name, elaps);
            }
        }
    }
    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:39:1: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      | ^~~~~~~~
main.c:39:3: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      |         ^~~~~~~~
main.c:42:1: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:42:3: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct {
    char name[100];
    int t;
} P;

P Q[100];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a, int b){
    return a < b ? a :b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }

　　head = 0;
    tail = n;

　　while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        
        if(u.t > 0){
            enqueue(u);
        }
        else{
            if(c>0){
                printf("%s %d\n", u.name, elaps);
                
            }
        }
    }
    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:39:1: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      | ^~~~~~~~
main.c:39:3: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      |         ^~~~~~~~
main.c:42:1: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:42:3: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct {
    char name[100];
    int t;
} P;

P Q[100];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a, int b){
    return a < b ? a :b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }

　　head = 0;
    tail = n + 1;

　　while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        
        if(u.t > 0){
            enqueue(u);
        }
        else{
            if(c>0){
                printf("%s %d\n", u.name, elaps);
                
            }
        }
    }
    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:39:1: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      | ^~~~~~~~
main.c:39:3: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      |         ^~~~~~~~
main.c:42:1: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:42:3: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct {
    char name[100];
    int t;
} P;

P Q[100];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a, int b){
    return a < b ? a :b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }

　　head = 0;
　　tail = n + 1;

　　while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        
        if(u.t > 0){
            enqueue(u);
        }
        else{
            if(c>0){
                printf("%s %d\n", u.name, elaps);
                
            }
        }
    }
    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:39:1: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      | ^~~~~~~~
main.c:39:3: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      |         ^~~~~~~~
main.c:40:1: error: stray '\343' in program
   40 | <U+3000><U+3000>tail = n + 1;
      | ^~~~~~~~
main.c:40:3: error: stray '\343' in program
   40 | <U+3000><U+3000>tail = n + 1;
      |         ^~~~~~~~
main.c:42:1: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:42:3: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct pp {
    char name[100];
    int t;
} P;

P Q[LEN];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a, int b){
    return a < b ? a :b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<=n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }

　　head = 0;
　　tail = n + 1;

　　while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        
        if(u.t > 0){
            enqueue(u);
        }
        else{
            if(c>0){
                printf("%s %d\n", u.name, elaps);
                
            }
        }
    }
    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:39:1: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      | ^~~~~~~~
main.c:39:3: error: stray '\343' in program
   39 | <U+3000><U+3000>head = 0;
      |         ^~~~~~~~
main.c:40:1: error: stray '\343' in program
   40 | <U+3000><U+3000>tail = n + 1;
      | ^~~~~~~~
main.c:40:3: error: stray '\343' in program
   40 | <U+3000><U+3000>tail = n + 1;
      |         ^~~~~~~~
main.c:42:1: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:42:3: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>

#include<string.h>

#define LEN 100005



typedef struct {

    char name[100];

    int t;

} P;



P Q[LEN];

int head, tail, n;



void enqueue(P x){

    Q[tail] = x;

    tail = (tail + 1) % LEN;

}



P dequeue(){

    P x = Q[head];

    head = (head + 1) % LEN;

    return x;

}



int min(int a, int b){

    return a < b ? a :b;

}



int main(){

    int elaps = 0, c;

    int i, q;

    P u;
    
    scanf("%d %d", &n, &q);

    for(i=0; i<n; i++){

        scanf("%s", Q[i].name);

        scanf("%d", &Q[i].t);

    }


　　head = 0;

    tail = n + 1;

    

　　while(head != tail){

        u = dequeue();

        c = min(q, u.t);

        u.t -= c;

        elaps += c;
        
        if(u.t > 0){

            enqueue(u);

        }

        else{

            if(c>0){

                printf("%s %d\n", u.name, elaps);

            }

        }

    }
    return 0;

}




Compiler output:
main.c: In function 'main':
main.c:74:1: error: stray '\343' in program
   74 | <U+3000><U+3000>head = 0;
      | ^~~~~~~~
main.c:74:3: error: stray '\343' in program
   74 | <U+3000><U+3000>head = 0;
      |         ^~~~~~~~
main.c:80:1: error: stray '\343' in program
   80 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:80:3: error: stray '\343' in program
   80 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>

#include<string.h>

#define LEN 100005



typedef struct {

    char name[100];

    int t;

} P;



P Q[LEN];

int head, tail, n;



void enqueue(P x){

    Q[tail] = x;

    tail = (tail + 1) % LEN;

}



P dequeue(){

    P x = Q[head];

    head = (head + 1) % LEN;

    return x;

}



int min(int a, int b){

    return a < b ? a :b;

}



int main(){

    int elaps = 0, c;

    int i, q;

    P u;
    
    scanf("%d %d", &n, &q);

    for(i=0; i<n; i++){

        scanf("%s", Q[i].name);

        scanf("%d", &Q[i].t);

    }


　　head = 1;

    tail = n + 1;

    

　　while(head != tail){

        u = dequeue();

        c = min(q, u.t);

        u.t -= c;

        elaps += c;
        
        if(u.t > 0){

            enqueue(u);

        }

        else{

            if(c>0){

                printf("%s %d\n", u.name, elaps);

            }

        }

    }
    return 0;

}




Compiler output:
main.c: In function 'main':
main.c:74:1: error: stray '\343' in program
   74 | <U+3000><U+3000>head = 1;
      | ^~~~~~~~
main.c:74:3: error: stray '\343' in program
   74 | <U+3000><U+3000>head = 1;
      |         ^~~~~~~~
main.c:80:1: error: stray '\343' in program
   80 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:80:3: error: stray '\343' in program
   80 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>

#include<string.h>

#define LEN 100005



typedef struct {

    char name[100];

    int t;

} P;



P Q[LEN];

int head, tail, n;



void enqueue(P x){

    Q[tail] = x;

    tail = (tail + 1) % LEN;

}



P dequeue(){

    P x = Q[head];

    head = (head + 1) % LEN;

    return x;

}



int min(int a, int b){

    return a < b ? a :b;

}



int main(){

    int elaps = 0, c;

    int i, q;

    P u;
    
    scanf("%d %d", &n, &q);

    for(i=0; i<n; i++){

        scanf("%s", Q[i].name);

        scanf("%d", &Q[i].t);

    }


　　int head = 1;
    int tail = n + 1;

　　while(head != tail){

        u = dequeue();

        c = min(q, u.t);

        u.t -= c;

        elaps += c;
        
        if(u.t > 0){

            enqueue(u);

        }

        else{

            if(c>0){

                printf("%s %d\n", u.name, elaps);

            }

        }

    }
    return 0;

}




Compiler output:
main.c: In function 'main':
main.c:74:1: error: stray '\343' in program
   74 | <U+3000><U+3000>int head = 1;
      | ^~~~~~~~
main.c:74:3: error: stray '\343' in program
   74 | <U+3000><U+3000>int head = 1;
      |         ^~~~~~~~
main.c:77:1: error: stray '\343' in program
   77 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:77:3: error: stray '\343' in program
   77 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>

#include<string.h>

#define LEN 100005



typedef struct {

    char name[100];

    int t;

} P;



P Q[LEN];

int head, tail, n;



void enqueue(P x){

    Q[tail] = x;

    tail = (tail + 1) % LEN;

}



P dequeue(){

    P x = Q[head];

    head = (head + 1) % LEN;

    return x;

}



int min(int a, int b){

    return a < b ? a :b;

}



int main(){

    int elaps = 0, c;
    int i, q;
    P u;

    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }

　　int head = 0;
    int tail = n + 1;

　　while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        if(u.t > 0){
            enqueue(u);
        }
        else{
            printf("%s %d\n", u.name, elaps);
        }
    }
    return 0;
}




Compiler output:
main.c: In function 'main':
main.c:67:1: error: stray '\343' in program
   67 | <U+3000><U+3000>int head = 0;
      | ^~~~~~~~
main.c:67:3: error: stray '\343' in program
   67 | <U+3000><U+3000>int head = 0;
      |         ^~~~~~~~
main.c:70:1: error: stray '\343' in program
   70 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:70:3: error: stray '\343' in program
   70 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct pp {
    char name[100];
    int t;
} P;

P Q[LEN];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}


int min(int a, int b){
    return a < b ? a : b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }

　　head = 0; tail = n + 1;

　　while(head != tail){
        u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        if(u.t > 0){
            enqueue(u);
        }
        else{
            printf("%s %d\n", u.name, elaps);
        }
    }
    return 0;
}




Compiler output:
main.c: In function 'main':
main.c:40:1: error: stray '\343' in program
   40 | <U+3000><U+3000>head = 0; tail = n + 1;
      | ^~~~~~~~
main.c:40:3: error: stray '\343' in program
   40 | <U+3000><U+3000>head = 0; tail = n + 1;
      |         ^~~~~~~~
main.c:42:1: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:42:3: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct pp {
    char name[100];
    int t;
} P;

P Q[LEN];
int head, tail, n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail + 1) % LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head + 1) % LEN;
    return x;
}


int min(int a, int b){
    return a < b ? a : b;
}

int main(){
    int elaps = 0, c;
    int i, q;
    P u;
    
    scanf("%d %d", &n, &q);
    for(i=0; i<n; i++){
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }

　　head = 0; tail = n + 1;

　　while(head != tail){
　　    u = dequeue();
        c = min(q, u.t);
        u.t -= c;
        elaps += c;
        if(u.t > 0){
            enqueue(u);
        }
        else{
            printf("%s %d\n", u.name, elaps);
        }
    }
    return 0;
}




Compiler output:
main.c: In function 'main':
main.c:40:1: error: stray '\343' in program
   40 | <U+3000><U+3000>head = 0; tail = n + 1;
      | ^~~~~~~~
main.c:40:3: error: stray '\343' in program
   40 | <U+3000><U+3000>head = 0; tail = n + 1;
      |         ^~~~~~~~
main.c:42:1: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      | ^~~~~~~~
main.c:42:3: error: stray '\343' in program
   42 | <U+3000><U+3000>while(head != tail){
      |         ^~~~~~~~
main.c:43:1: error: stray '\343' in program
   43 | <U+3000><U+3000>    u = dequeue();
      | ^~~~~~~~
main.c:43:3: error: stray '\343' in program
   43 | <U+3000><U+3000>    u = dequeue();
      |         ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100000;

typedef struct pp{
  char name[100];
  int t;
}P;

P Q[LEN];
int head,tail,n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail+1)%LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head+1)%LEN;
    return x;
}

int min(int a,int b){
    return a<b?a:b;
}

int main(){
    int elaps = 0,c;
    int i,q;
    P u;
    scanf("%d %d",&n,&q);
    
    for(i = 1;i<=n;i++){
        scanf("%s",Q[i].name);
        scanf("%d",&Q[i].t);
    }
    head =1;tail =n+1;
    
    while(head!=tail){
        u =dequeue();
        c=min(q,u.t);
        u.t -=c;
        elaps +=c;
        if(u.t > 0) enqueue(u);
        else{
            printf("%s %d\n",u.name,elaps);
        }
    }
    return 0;
    
}


Compiler output:
main.c:3:19: error: expected ']' before ';' token
    3 | #define LEN 100000;
      |                   ^
main.c:10:5: note: in expansion of macro 'LEN'
   10 | P Q[LEN];
      |     ^~~
main.c: In function 'enqueue':
main.c:14:5: error: 'Q' undeclared (first use in this function)
   14 |     Q[tail] = x;
      |     ^
main.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'dequeue':
main.c:19:11: error: 'Q' undeclared (first use in this function)
   19 |     P x = Q[head];
      |           ^
main.c: In function 'main':
main.c:35:20: error: 'Q' undeclared (first use in this function)
   35 |         scanf("%s",Q[i].name);
      |                    ^
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005;

typedef struct pp{
  char name[100];
  int t;
}P;

P Q[LEN];
int head,tail,n;

void enqueue(P x){
    Q[tail] = x;
    tail = (tail+1)%LEN;
}

P dequeue(){
    P x = Q[head];
    head = (head+1)%LEN;
    return x;
}

int min(int a,int b){
    return a<b?a:b;
}

int main(){
    int elaps = 0,c;
    int i,q;
    P u;
    scanf("%d %d",&n,&q);
    
    for(i = 1;i<=n;i++){
        scanf("%s",Q[i].name);
        scanf("%d",&Q[i].t);
    }
    head =1;tail =n+1;
    
    while(head!=tail){
        u =dequeue();
        c=min(q,u.t);
        u.t -=c;
        elaps +=c;
        if(u.t > 0) enqueue(u);
        else{
            printf("%s %d\n",u.name,elaps);
        }
    }
    return 0;
    
}


Compiler output:
main.c:3:19: error: expected ']' before ';' token
    3 | #define LEN 100005;
      |                   ^
main.c:10:5: note: in expansion of macro 'LEN'
   10 | P Q[LEN];
      |     ^~~
main.c: In function 'enqueue':
main.c:14:5: error: 'Q' undeclared (first use in this function)
   14 |     Q[tail] = x;
      |     ^
main.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'dequeue':
main.c:19:11: error: 'Q' undeclared (first use in this function)
   19 |     P x = Q[head];
      |           ^
main.c: In function 'main':
main.c:35:20: error: 'Q' undeclared (first use in this function)
   35 |         scanf("%s",Q[i].name);
      |                    ^
Language: C

#include<stdio.h>
#include<string.h>

struct queues {
	char name[11];
	int time;
	int next;
};

int main( void ) 
{
	struct queues ps[100001];
	int i;
	int n,q;
	int cnt,cur,pre;
	int time,res;
	int head;
	
	scanf( "%d%d", &n, &q );
	head=0;
	for( i=0; i<n; i++ ) {
		scanf( "%s%d", ps[i].name, &ps[i].time );
		ps[i].pre=i-1;
		ps[i].next=i+1;
	}
	
	res=time=cnt=0;
	pre=-1;
	cur=head;
	while( cnt<n ) {
		res=ps[cur].time-q;
		if( res <= 0 ) {
			time+=ps[cur].time;
			ps[cur].time=time;
			printf( "%s %d\n", ps[cur].name, ps[cur].time );
			
			if( head == cur ) {
				head=ps[cur].next;
			} else {
				ps[ pre ].next=ps[cur].next;
			}
			cnt++;
		} else {
			time+=q;
			ps[cur].time=res;
			pre=cur;
		}
		cur=ps[cur].next;
		
		if( n<=cur ) { 
			cur=head;
		}	
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:22: error: 'struct queues' has no member named 'pre'
   23 |                 ps[i].pre=i-1;
      |                      ^
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 10000
 
typedef struct pp{
  char name[100];
  int t;
}P;
 
int main(){
  int n, i, q
  long long int sum =0;
  P Q[LEN+1];
  scanf("%d %d", &n, &q);
 
  for ( i = 1; i <= n; i++){
    scanf("%s", Q[i].name);
    scanf("%d", &Q[i].t);
  }
  i = 1;
  while(1){
    if(i == n+1) i = 1;
    int cnt=0;
    while(1){
      if(i == n+1) i = 1;
      if(Q[i].t != 0) break;
      i++;
      cnt++;
      if(cnt > n){
        i = -1;
        break;
      }
    }
    if(i == -1) break;
    if(Q[i].t > q){
      sum += q;
      Q[i].t -= q;
    } else {
      sum += Q[i].t;
      Q[i].t = 0;
      printf("%s %lld\n", Q[i].name, sum);
    }
    i++;
  }   
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'long'
   12 |   long long int sum =0;
      |   ^~~~
main.c:14:23: error: 'q' undeclared (first use in this function)
   14 |   scanf("%d %d", &n, &q);
      |                       ^
main.c:14:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:36:7: error: 'sum' undeclared (first use in this function)
   36 |       sum += q;
      |       ^~~
Language: C

#include<stdio.h>
#include<string.h>
#define N 100000
#define QON 1000
#define LEN 100005

typedef struct pp{
  char name[100];
  int time;
}P;

P Q[LEN+1];
int head, tail, n;

void enqueue(P x){

}

P dequeue(){

}


int main(){
  int elaps = 0, c;
  int i, q;
  P u;
  scanf("%d %d", &n, &q);

  for ( i = 1; i <= n; i++){
    scanf("%s", Q[i].name);
    scanf("%d", &Q[i].t);
  }

  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:22: error: 'P' {aka 'struct pp'} has no member named 't'
   32 |     scanf("%d", &Q[i].t);
      |                      ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
  char c[100001][10],box[10];
  int time[100001];
  int i,n,q,top=0,tail=0,fcount=0,tcount=0,judgec=0;
  scanf("%d%d",&n,&q);
  
  for(i=0;fcount != n;i++){
    if(i < n){ 
      scanf("%s%d",c[i],&time[i]);
      tail++;
    }
    if(time[top]-q <= 0){
      tcount += time[top];
      time[top]=0;
      printf("%s %d\n",c[top],tcount);
      fcount++;
      if(top == n-1) top =0;
      else top++;
    }
      else{
	time[top]-=q;
	strcpy(c[tail],c[top]);
	time[tail]=time[top];
	tcount+=q;
	if(top == n-1) top = 0;
	else top++;

Compiler output:
main.c: In function 'main':
main.c:29:9: error: expected declaration or statement at end of input
   29 |         else top++;
      |         ^~~~
main.c:29:9: error: expected declaration or statement at end of input
main.c:29:9: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 10005

typedef struct kouzou{
  char name[100];
  int t;
}K;

K Q[LEN];
int head,tail,n;

void enqueue(K x){
  Q[tail] = x;
  tail += 1;
  tail = tail % LEN;
}

K dequeue(){
  K x = Q[head];
  head += 1;
  head = head % LEN;
  return x;
}

int main(void){
  int min(int,int);
  int m = 0,a,i,q;
  K u;
  scanf("%d%d",&n,&q);
  for ( i = 1 ; i <= n ; i++ ){
    scanf("%s",Q[i].name);
    scanf("%d",&Q[i].t);
  }
  head = 1;
  tail = n + 1;
  while ( head != tail ){
    u = dequeue();
    a = min(q,u.t);
    u.t -= a;
    m += a;
    if ( u.t > 0 ){
      enqueue(u);
    }
    else{
      printf("%s %d\n",u.name,m);
    }
  }
  return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccqUEPmW.o: in function `main':
main.c:(.text+0x3ee): undefined reference to `min'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#define MAX 100000
typedef struct{
	char name[100];
	int time;
} roll;

void enqueue(roll);
roll dequeue(void);

int head=0,tail=0;
roll Q[MAX];

	int main(void){
	int n,q,i,sum=0;
	roll p;

		scanf("%d%d",&n,&q);
		for(i=0;i<n;i++){
			scanf("%s%d",p.name,&p.time);
			enqueue(p);
		}
		while(1){
			if(head == tail) break;
			if(Q[head].time > q){
				p = dequeue();
				p.time -= q;
				enqueue(p);
				sum += q; 
			}
			else{
				p = dequeue();
				printf("%s %d\n",p.name,p.time+sum);
				sum += p.time;
			}
		}
return 0;
}

void enpueue(roll p){
Q[tail] = p;
if(tail+1 == MAX) tail = 0;
else tail++;
}

roll depueue(){
	roll x;
	x = Q[head];

	if(head+1 == MAX) head = 0;
	else head++;
	return x;
}

Compiler output:
/usr/bin/ld: /tmp/cchaeQXF.o: in function `main':
main.c:(.text+0xe0): undefined reference to `enqueue'
/usr/bin/ld: main.c:(.text+0x14c): undefined reference to `dequeue'
/usr/bin/ld: main.c:(.text+0x269): undefined reference to `enqueue'
/usr/bin/ld: main.c:(.text+0x287): undefined reference to `dequeue'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#include<string.h>
#define N 100000
 
typedef struct pp{
  char name[100];
  int time;
}Process;
 
void enqueue(){
  Q[head].time = Q[head].time -q;
  Q[tail] = Q[head];
  if(tail > n+1) tail = 0;
  else tail++;
}
 
void dequeue(){
  printf("%s %d\n",Q[head].name, Q[head].time+c);
}

int head, tail, n, c=0, q;
Process Q[N]; 

int main(){
  int i;
   
  scanf("%d %d", &n, &q);
  for ( i = 1; i <= n; i++){
    scanf("%s", Q[i].name);
    scanf("%d", &Q[i].time);
  }
  head = 1;
  tail = n+1;
  i = 1;
  while(head != tail){
    if(Q[head].time > q){
    enqueue();
    c = c + q;
    }
    else{
      dequeue();
      c = c + Q[head].time;
    }
  if(head > n+1) head = 0;
  else head++;
  }
  return 0;
}

Compiler output:
main.c: In function 'enqueue':
main.c:11:3: error: 'Q' undeclared (first use in this function)
   11 |   Q[head].time = Q[head].time -q;
      |   ^
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:5: error: 'head' undeclared (first use in this function)
   11 |   Q[head].time = Q[head].time -q;
      |     ^~~~
main.c:11:32: error: 'q' undeclared (first use in this function)
   11 |   Q[head].time = Q[head].time -q;
      |                                ^
main.c:12:5: error: 'tail' undeclared (first use in this function)
   12 |   Q[tail] = Q[head];
      |     ^~~~
main.c:13:13: error: 'n' undeclared (first use in this function)
   13 |   if(tail > n+1) tail = 0;
      |             ^
main.c: In function 'dequeue':
main.c:18:20: error: 'Q' undeclared (first use in this function)
   18 |   printf("%s %d\n",Q[head].name, Q[head].time+c);
      |                    ^
main.c:18:22: error: 'head' undeclared (first use in this function)
   18 |   printf("%s %d\n",Q[head].name, Q[head].time+c);
      |                      ^~~~
main.c:18:47: error: 'c' undeclared (first use in this function)
   18 |   printf("%s %d\n",Q[head].name, Q[head].time+c);
      |                                               ^
Language: C

#include<stdio.h>
#define MAX 100000
typedef struct{
    char name[100];
    int time;
} queue;
 
void enqu(queue);
queue dequ(void);
 
int head=0,tail=0;
queue C[MAX];
 
    main(){
    int n,m,i,sum=0;
    queue D;

    scanf("%d%d",&n,&m);
        for(i=0;i<n;i++){
            scanf("%s%d",D.name,&D.time);
            enqu(D);
        }
        while(1){
            if(head == tail) break;
            if(D[head].time > m){
                m = dequ();
                D.time -= C;
                enqu(D);
                sum += m;
            }
            else{
                D = dequeue();
                printf("%s %d\n",D.name,D.time+sum);
                sum += D.time;
            }
        }
return 0;
}
 
void enqu(queue p){
C[tail] = p;
if(tail+1 == MAX) tail = 0;
else tail++;
}
 
queue dequ(){
    queue x;
    x = C[head];
 
    if(head+1 == MAX) head = 0;
    else head++;
    return x;
}

Compiler output:
main.c:14:5: error: return type defaults to 'int' [-Wimplicit-int]
   14 |     main(){
      |     ^~~~
main.c: In function 'main':
main.c:25:17: error: subscripted value is neither array nor pointer nor vector
   25 |             if(D[head].time > m){
      |                 ^
main.c:26:21: error: incompatible types when assigning to type 'int' from type 'queue'
   26 |                 m = dequ();
      |                     ^~~~
main.c:27:24: error: invalid operands to binary - (have 'int' and 'queue *')
   27 |                 D.time -= C;
      |                 ~~~~~~ ^~ ~
      |                  |        |
      |                  int      queue *
main.c:32:21: error: implicit declaration of function 'dequeue'; did you mean 'dequ'? [-Wimplicit-function-declaration]
   32 |                 D = dequeue();
      |                     ^~~~~~~
      |                     dequ
main.c:32:21: error: incompatible types when assigning to type 'queue' from type 'int'
Language: C

#include<stdio.h>
#define MAX 100000
typedef struct{
    char name[100];
    int time;
} queue;
 
void enqu(queue);
queue dequ(void);
 
int head=0,tail=0;
queue C[MAX];
 
    main(){
    int n,m,i,sum=0;
    queue D;

    scanf("%d%d",&n,&m);
        for(i=0;i<n;i++){
            scanf("%s%d",D->name,&D->time);
            enqu(D);
        }
        while(1){
            if(head == tail) break;
            if(D[head].time > m){
                m = dequ();
                D.time -= m;
                enqu(D);
                sum += m;
            }
            else{
                D = dequeue();
                printf("%s %d\n",D.name,D.time+sum);
                sum += D.time;
            }
        }
return 0;
}
 
void enqu(queue p){
C[tail] = p;
if(tail+1 == MAX) tail = 0;
else tail++;
}
 
queue dequ(){
    queue x;
    x = C[head];
 
    if(head+1 == MAX) head = 0;
    else head++;
    return x;
}

Compiler output:
main.c:14:5: error: return type defaults to 'int' [-Wimplicit-int]
   14 |     main(){
      |     ^~~~
main.c: In function 'main':
main.c:20:27: error: invalid type argument of '->' (have 'queue')
   20 |             scanf("%s%d",D->name,&D->time);
      |                           ^~
main.c:20:36: error: invalid type argument of '->' (have 'queue')
   20 |             scanf("%s%d",D->name,&D->time);
      |                                    ^~
main.c:25:17: error: subscripted value is neither array nor pointer nor vector
   25 |             if(D[head].time > m){
      |                 ^
main.c:26:21: error: incompatible types when assigning to type 'int' from type 'queue'
   26 |                 m = dequ();
      |                     ^~~~
main.c:32:21: error: implicit declaration of function 'dequeue'; did you mean 'dequ'? [-Wimplicit-function-declaration]
   32 |                 D = dequeue();
      |                     ^~~~~~~
      |                     dequ
main.c:32:21: error: incompatible types when assigning to type 'queue' from type 'int'
Language: C

#include<stdio.h>
#define MAX 100000
typedef struct{
    char name[100];
    int time;
} queue;
 
void enqu(queue);
queue dequ(void);
 
int head=0,tail=0;
queue C[MAX];
 
    main(){
    int n,m,i,sum=0;
    queue D;

    scanf("%d%d",&n,&m);
        for(i=0;i<n;i++){
            scanf("%s%d",D.name,&D.time);
            enqu(D);
        }
        while(1){
            if(head == tail) break;
            if(C[head].time > m){
                m = dequ();
                D.time -= m;
                enqu(D);
                sum += m;
            }
            else{
                D = dequeue();
                printf("%s %d\n",D.name,D.time+sum);
                sum += D.time;
            }
        }
return 0;
}
 
void enqu(queue p){
C[tail] = p;
if(tail+1 == MAX) tail = 0;
else tail++;
}
 
queue dequ(){
    queue x;
    x = C[head];
 
    if(head+1 == MAX) head = 0;
    else head++;
    return x;
}

Compiler output:
main.c:14:5: error: return type defaults to 'int' [-Wimplicit-int]
   14 |     main(){
      |     ^~~~
main.c: In function 'main':
main.c:26:21: error: incompatible types when assigning to type 'int' from type 'queue'
   26 |                 m = dequ();
      |                     ^~~~
main.c:32:21: error: implicit declaration of function 'dequeue'; did you mean 'dequ'? [-Wimplicit-function-declaration]
   32 |                 D = dequeue();
      |                     ^~~~~~~
      |                     dequ
main.c:32:21: error: incompatible types when assigning to type 'queue' from type 'int'
Language: C

#include <stdio.h>
#include <string.h>
#define N 100000

int main(){
  int n, q, time[N], head = 0, tail = 0, t = 0, i;
  char name[11][N];

  scanf("%d%d" ,&n ,&q);
  for(i = 0; i < n; i++){
    scanf("%s%d", name[i], &time[i]);
    tail += 1;
  }

    while(1){
      if(head == tail) break;
      if(time[head] > q){
	t += q;
	strcpy(name[tail], name[head]);
	time[tail] = time[head];
	tail += 1;
	if(tail >= N) tail = 0;
      }
      else{
	printf("%s %d\n", name[head], time[head] + t);
      }
      head += 1;
      if(head >= N) head = 0;
    }
  }
  return 0;
}

Compiler output:
main.c:31:3: error: expected identifier or '(' before 'return'
   31 |   return 0;
      |   ^~~~~~
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
Language: C

#include <stdio.h>
#include <string.h>
#define N 100000

int main(){
  int n, q, time[N], head = 0, tail = 0, t_sum = 0, i;
  char name[11][N];

  scanf("%d%d" ,&n ,&q);
  for(i = 0; i < n; i++){
    scanf("%s%d", name[i], &time[i]);
    tail += 1;
  }

    while(head != tail){
      if(time[head] > q){
	t_sum += q;
        time[head] -= q;
	strcpy(name[tail], name[head]);
	time[tail] = time[head];
	tail += 1;
	if(tail >= N) tail = 0;
      }
      else{
        t_sum += time[head];
	printf("%s %d\n", name[head], t_sum);
      }
      head += 1;
      if(head >= N) head = 0;
    }
  }
  return 0;
}

Compiler output:
main.c:32:3: error: expected identifier or '(' before 'return'
   32 |   return 0;
      |   ^~~~~~
main.c:33:1: error: expected identifier or '(' before '}' token
   33 | }
      | ^
Language: C

#include<stdio.h>
#define N 100000
 
typedef struct pro{
  char name[10];
  int tim;
}P;
 
P Q[N+1];
int length,quantum;
int top,end;
 
void enqueue(P);
proceses dequeue(void);
void printqueue(void);
 
main(){

  int i;
  P p;
  int t_time=0;
  int count=0;
   
  scanf("%d %d",&length,&quantum);
   
  top = length/2;
  end = length/2;
   
  for(i=0; i<length; i++){
    scanf("%s %d",p.name,&p.tim);
    enqueue(p);
  }
 
  while(count != length){
     
    p = dequeue(); 
    if(p.tim > quantum){
      t_time += quantum;
      p.tim -= quantum;
      enqueue(p);
    }

    else{
      t_time += p.tim;
      printf("%s %d\n",p.name,t_time);    
      count++;
    }  
  }
  
  return 0;
}
 
void enqueue(P p){
   
  Q[end] = p;
  if(end == length){
    end = 0;
  }

  else
    end++;
}
 
P dequeue(){
  P x; 
 
  x = Q[top];
  if(top == length){
    top = 0;
  }

  else
    top++;
   
  return x;
}
 
void printqueue(void){
  int i;
   
  for(i=top; i!=end; i++){
    if(i==length){
      printf("%s %d ",Q[i].name,Q[i].tim);
      i=0;
      printf("\n");
    }

    printf("%s %d ",Q[i].name,Q[i].tim);
    printf("\n");
  } 
}

Compiler output:
main.c:14:1: error: unknown type name 'proceses'
   14 | proceses dequeue(void);
      | ^~~~~~~~
main.c:17:1: error: return type defaults to 'int' [-Wimplicit-int]
   17 | main(){
      | ^~~~
main.c: In function 'main':
main.c:36:9: error: incompatible types when assigning to type 'P' {aka 'struct pro'} from type 'int'
   36 |     p = dequeue();
      |         ^~~~~~~
main.c: At top level:
main.c:64:3: error: conflicting types for 'dequeue'; have 'P()' {aka 'struct pro()'}
   64 | P dequeue(){
      |   ^~~~~~~
main.c:14:10: note: previous declaration of 'dequeue' with type 'int(void)'
   14 | proceses dequeue(void);
      |          ^~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct pp{
  char name[100];
  int t;
}P;

P Q[LEN];
int head, tail, n;

void enqueue(P x){
  Q[tail] = x;
  tail = (tail + 1) % LEN;
}

P dequeue(){
  P x = Q[head];
  head = (head + 1) % LEN;
  return x;
}

int min(int a, int b){ return a < b ? a : b; }

int main(){
  int elaps = 0, c;
  int i, q;
  P u;
  scanf("%d %d", &n, &q);
  for( i = 1 ; i <= n ; i++ ){
    scanf("%s", Q[i].name);
    scanf("%d", &Q[i].t);
  }
  head = 1; tail = n + 1;
  While ( head != tail ){
    u = dequeue();
    c = min(q, u.t);
    u.t -= c;
    elaps += c;
    if( u.t > 0 )enqueue(u);
    else{
      printf("%s %d\n",u.name, elaps);
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:36:3: error: implicit declaration of function 'While' [-Wimplicit-function-declaration]
   36 |   While ( head != tail ){
      |   ^~~~~
main.c:36:25: error: expected ';' before '{' token
   36 |   While ( head != tail ){
      |                         ^
      |                         ;
Language: C

#include<stdio.h>
#include<string.h>
int a;
int q;

typedef struct{
  char name[100];
  int time;
} Queue;

Queue Q[10000000];
int n;
int head = 0, tail = 0;

void enqueue(Queue x) {
  Q[head] = x;
  head++;
}

Queue dequeue() {
  tail++;
  return Q[tail-1];
}

int main(void){
  int i,j;
  int cnt;
  int SumOfTime = 0;
  Queue x;
  scanf("%d %d", &n, &q);

  for(i = 0; i < n; i++) {
    scanf("%s",x.name);
    scanf("%d",&x.time);
    enqueue(x);
  }

  while(1) {
    x = dequeue();
    if(x.t <= q) {
      SumOfTime += x.t;
      printf("%s %d\n", x.name, SumOfTime);
    } else {
      x.t -= q;
      time += q;
      enqueue(x);
    }
    if(head == tail)break;
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:40:9: error: 'Queue' has no member named 't'
   40 |     if(x.t <= q) {
      |         ^
main.c:41:21: error: 'Queue' has no member named 't'
   41 |       SumOfTime += x.t;
      |                     ^
main.c:44:8: error: 'Queue' has no member named 't'
   44 |       x.t -= q;
      |        ^
main.c:45:7: error: 'time' undeclared (first use in this function)
   45 |       time += q;
      |       ^~~~
main.c:3:1: note: 'time' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
    2 | #include<string.h>
  +++ |+#include <time.h>
    3 | int a;
main.c:45:7: note: each undeclared identifier is reported only once for each function it appears in
   45 |       time += q;
      |       ^~~~
Language: C

#include<stdio.h>
#include<string.h>
int a;
int q;

typedef struct{
  char name[100];
  int time;
} Queue;

Queue Q[10000000];
int n;
int head = 0, tail = 0;

void enqueue(Queue x) {
  Q[head] = x;
  head++;
}

Queue dequeue() {
  tail++;
  return Q[tail-1];
}

int main(void){
  int i,j;
  int cnt;
  int SumOfTime = 0;
  Queue x;
  scanf("%d %d", &n, &q);

  for(i = 0; i < n; i++) {
    scanf("%s",x.name);
    scanf("%d",&x.time);
    enqueue(x);
  }

  while(1) {
    x = dequeue();
    if(x.time <= q) {
      SumOfTime += x.time;
      printf("%s %d\n", x.name, SumOfTime);
    } else {
      x.time -= q;
      TimeOfSum += q;
      enqueue(x);
    }
    if(head == tail)break;
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:45:7: error: 'TimeOfSum' undeclared (first use in this function)
   45 |       TimeOfSum += q;
      |       ^~~~~~~~~
main.c:45:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

struct node{
  unsigned int key;
  struct node *n;
  struct node *p;
};

typedef struct node * NodePointer;

NodePointer nil;

NodePointer listSearch(int key){
  /* your code */
}

void init(){
  nil = malloc(sizeof(struct node));
  nil->n = nil;
  nil->p = nil;
}

void printList(){
  NodePointer cu = nil->n;
  int is = 1;
  while(1){
    if ( cu == nil ) break;
    if ( is == 0)  printf(" ");
    printf("%d", cu->key);
    cu = cu->n;
    is = 0;
  }
  printf("\n");
}

void deleteNode(NodePointer t){
  /* your code */
  t->p->n = t->n;
  t->n->p = t->p;

}

void deleteFirst(){
  NodePointer t = nil->n;
  if ( t == nil ) return;
  deleteNode(t);
}

void deleteLast(){
  /* your code */
  deleteNode(d);
}

void delete(int key){
  /* your code */
  NodePointer d;
  d=listSearch(key);
  deleteNode(d);
}


void insert(int key){
  NodePointer x;
  x = malloc(sizeof(struct node));
  x->key = key;

  /* your code */
  x->n = nil->n;
  nil->n->p = x;
  nil->next = x
  x->p = nil
  


}

int main(){
  int key, n, i;
  int size = 0;
  char co[20];
  int n_p = 0, n_d = 0;
  scanf("%d", &n);
  init();
  for ( i = 0; i < n; i++ ){
    scanf("%s%d", co, &key);
    if ( co[0] == 'i' ) {insert(key); n_p++; size++;}
    else if ( co[0] == 'd' ) {
      if (strlen(co) > 6){
	if ( co[6] == 'F' ) deleteFirst();
	else if ( co[6] == 'L' ) deleteLast();
      } else {
	delete(key); n_d++; 
      }
      size--;
    }
  }

  printList();

}

Compiler output:
main.c: In function 'deleteLast':
main.c:53:14: error: 'd' undeclared (first use in this function)
   53 |   deleteNode(d);
      |              ^
main.c:53:14: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'insert':
main.c:72:6: error: 'struct node' has no member named 'next'
   72 |   nil->next = x
      |      ^~
main.c:72:16: error: expected ';' before 'x'
   72 |   nil->next = x
      |                ^
      |                ;
   73 |   x->p = nil
      |   ~
Language: C

#include<stdio.h>
#define M 100000

typedef struct{
  char name[10];
  int time;
}Que;

void enqueue(int);
int dequeue(void);
int head=0,tail=0;

 Que p[M];

int main(){
  Que p[M];

  int i,j,n,q,k;

  scanf("%d%d",&n,&q);
    for(i=0;i<n;i++){
      scanf("%s%d",p[i].name,&p[i].time);
      enqueue(p[i].time);
    }
    while(1){
      if(p[i].time>q){
	p[i].time-=q;
	dequeue();

      }
    for(i=0;i<n;i++){
      printf("%s %d",)
	}

}

void enqueue(int x){ 
  int Q[M];
  Q[tail] = x;

  if(Q[tail+1]==M){
    tail=0;
  }

  else tail++;
 
}

int dequeue(){

  int x;
  int Q[M];
  x=Q[head];

  if(Q[head+1]==M){
    head=0;
  }
  else head++;
  return x;
}

Compiler output:
main.c: In function 'main':
main.c:32:22: error: expected expression before ')' token
   32 |       printf("%s %d",)
      |                      ^
main.c:60:1: error: expected declaration or statement at end of input
   60 | }
      | ^