結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
commy
|
| 提出日時 | 2016-05-09 15:20:05 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 378µs | |
| コード長 | 550 bytes |
| 記録 | |
| コンパイル時間 | 300 ms |
| コンパイル使用メモリ | 73,984 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-13 14:47:11 |
| 合計ジャッジ時間 | 1,756 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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