Submission #54927


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<bits/stdc++.h>
using namespace std;
queue<int> i;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
long long a=0,b=0,c=0,d=0,e=1,f=0;
string s;
while(1){
cin >>s;
if(s=="exit") break;
if(s=="push") cin >>a,i.push(a);
else{
if(s=="pop") i.pop();
else cout <<i.front()<<'\n';
}
}
return (0);
}

ステータス

項目 データ
問題 0601 - プログラミング入門:Queue
ユーザー名 ei1923
投稿日時 2019-09-17 15:59:55
言語 C++14
状態 Accepted
得点 1
ソースコード長 370 Byte
最大実行時間 125 ms
最大メモリ使用量 4204 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01 AC 32 ms 604 KB
1
Input02 AC 20 ms 692 KB
1
Input03 AC 20 ms 516 KB
1
Input04 AC 17 ms 456 KB
1
Input05 AC 19 ms 524 KB
1
Input06 AC 26 ms 704 KB
1
Input07 AC 31 ms 940 KB
1
Input08 AC 65 ms 1616 KB
1
Input09 AC 91 ms 2800 KB
1
Input10 AC 125 ms 4204 KB
1