Submission #00052


ソースコード

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
33
34
35
#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<vector>
#include<math.h>
#include<numeric>
#include<limits.h>
#include<string>
#include<queue>
#include<deque>
using namespace std;
int main(){
int n;
cin>>n;
queue<string>q;
for(int i=0 ; i<n ; i++){
int x;
cin>>x;
if(x==1){
string s;
cin>>s;
q.push(s);
}else if(x==2){
q.pop();
}else if(x==3){
cout<<q.size()<<"\n";
}else if(x==4){
if(q.size()>0){
cout<<q.front()<<"\n";
}else{
cout<<-1<<endl;
}
}
}
}

ステータス

項目 データ
問題 0002 - 行列のできる喫茶店
ユーザー名 r2412
投稿日時 2024-07-08 17:30:19
言語 C++17
状態 Runtime Error
得点 0
ソースコード長 707 Byte
最大実行時間 54 ms
最大メモリ使用量 472 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in1.txt AC 25 ms 472 KB
1
in2.txt RE 54 ms 448 KB
1
in3.txt AC 34 ms 420 KB
1
in4.txt RE 34 ms 392 KB
1
in5.txt RE 28 ms 348 KB
1
in6.txt RE 27 ms 452 KB
1