結果
問題 | No.24 数当てゲーム |
ユーザー |
![]() |
提出日時 | 2018-07-16 20:11:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 479 bytes |
コンパイル時間 | 562 ms |
コンパイル使用メモリ | 64,136 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 13:03:12 |
合計ジャッジ時間 | 1,165 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <iostream>using namespace std;int main(){int n;cin >> n;int a,b,c,d;string s;int num[]={0,1,2,3,4,5,6,7,8,9};for(int i=0;i<n;i++){cin >>a>>b>>c>>d>>s;if(s=="YES"){for(int j=0;j<10;j++){if(j!=a && j!=b && j!=c && j!=d){num[j]=-1;}}}else{num[a]=-1;num[b]=-1;num[c]=-1;num[d]=-1;}}for(int i=0;i<10;i++){if(num[i]!=-1){cout << num[i] << endl; return 0;}}}