Submission #00281


ソースコード

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
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
int a,b;
cin>>n;
int ans[n+1];
char s;
for(int i=0;i<n;i++){
cin>>s;
if(s=='^'){
cin>>a>>b;
ans[i]=(a ^ b);
}
else if(s=='~'){
cin>>a;
ans[i]=(~a);
}
}
if(n==0)cout<<endl;
else{
for(int i=0;i<n;i++){
if(i==n-1)cout<<ans[i]<<endl;
else cout<<ans[i]<<' ';
}
}
return(0);
}

ステータス

項目 データ
問題 0010 - 論理的な英雄王 2nd
ユーザー名 r1705
投稿日時 2017-11-06 18:29:55
言語 C++11
状態 Accepted
得点 10
ソースコード長 447 Byte
最大実行時間 21 ms
最大メモリ使用量 500 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01.txt AC 19 ms 480 KB
1
Input02.txt AC 20 ms 452 KB
1
Input03.txt AC 19 ms 424 KB
1
Input04.txt AC 21 ms 400 KB
1
Input05.txt AC 19 ms 500 KB
1