Submission #00262


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int b,d;
string a;
int ans[n];
for(int i=0;i<n;i++){
ans[i]=0;
cin>>a;
cin>>b>>d;
if(a=="&")
ans[i]+=b&d;
else if(a=="|")
ans[i]+=b|d;
if(i==n-1)
cout<<ans[i];
else
cout<<ans[i]<<" ";
}
cout<<endl;
return 0;
}

ステータス

項目 データ
問題 0009 - 論理的な英雄王
ユーザー名 ei1725
投稿日時 2017-11-06 18:28:05
言語 C++11
状態 Accepted
得点 9
ソースコード長 378 Byte
最大実行時間 22 ms
最大メモリ使用量 644 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01.txt AC 14 ms 480 KB
1
Input02.txt AC 13 ms 456 KB
1
Input03.txt AC 19 ms 560 KB
1
Input04.txt AC 16 ms 536 KB
1
Input05.txt AC 22 ms 644 KB
1