Submission #41378


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdio.h>
#include <string.h>
#include <math.h>
#define true 1
#define false 0
typedef int boolean;
typedef long long Long;
int queue[20002000];
int next = 0;
int put = 0;
int main(){
char com[10];
scanf("%s", com);
while ( strcmp("exit", com) ) {
if ( !strcmp("push", com) ) {
int a;
scanf("%d", &a);
queue[put++] = a;
}
else if ( !strcmp("front", com)) {
printf("%d\n", queue[next]);
}
else {
next++;
}
scanf("%s", com);
}
return 0;
}

ステータス

項目 データ
問題 0601 - プログラミング入門:Queue
ユーザー名 r1825
投稿日時 2018-08-21 09:18:33
言語 C
状態 Accepted
得点 1
ソースコード長 616 Byte
最大実行時間 183 ms
最大メモリ使用量 23208 KB

セット

セット 得点 Cases
1 ALL 1 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01 AC 43 ms 380 KB
1
Input02 AC 17 ms 540 KB
1
Input03 AC 19 ms 592 KB
1
Input04 AC 25 ms 512 KB
1
Input05 AC 20 ms 688 KB
1
Input06 AC 38 ms 1232 KB
1
Input07 AC 40 ms 2196 KB
1
Input08 AC 81 ms 5472 KB
1
Input09 AC 118 ms 12168 KB
1
Input10 AC 183 ms 23208 KB
1