結果
問題 |
No.24 数当てゲーム
|
ユーザー |
![]() |
提出日時 | 2015-07-14 19:20:05 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 495 bytes |
コンパイル時間 | 1,283 ms |
コンパイル使用メモリ | 162,908 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-08 07:15:37 |
合計ジャッジ時間 | 1,961 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; struct Question { array<int, 4> v; bool res; }; int main() { int n; cin >> n; vector<Question> q(n); for (int i = 0; i < n; ++i) { for (int& j : q[i].v) cin >> j; string s; cin >> s; q[i].res = (s == "YES"); } for (int i = 0; i < 10; ++i) { auto f = [&](Question q){return (find(q.v.begin(), q.v.end(), i) != q.v.end()) == q.res;}; if (all_of(q.begin(), q.end(), f)) { cout << i << endl; } } }