結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
commy
|
| 提出日時 | 2016-05-09 15:20:05 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 550 bytes |
| コンパイル時間 | 596 ms |
| コンパイル使用メモリ | 65,140 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-11 00:31:39 |
| 合計ジャッジ時間 | 1,074 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include<iostream>
#include<string>
using namespace std;
int yeslist[10];
int nolist[10];
int cnt;
int main(){
int N;
cin>>N;
for(int i=0;i<N;i++){
int a,b,c,d;
string str;
cin>>a>>b>>c>>d>>str;
if(str == "YES"){
cnt++;
yeslist[a]++;
yeslist[b]++;
yeslist[c]++;
yeslist[d]++;
}else{
nolist[a] |= 1;
nolist[b] |= 1;
nolist[c] |= 1;
nolist[d] |= 1;
}
}
for(int i=0;i<10;i++){
if(yeslist[i] == cnt && !nolist[i]){
cout<<i<<endl;
}
}
return 0;
}
commy