結果

問題 No.24 数当てゲーム
ユーザー こるこる
提出日時 2017-02-25 11:56:40
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 1,506 bytes
コンパイル時間 629 ms
コンパイル使用メモリ 87,664 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-02 07:59:18
合計ジャッジ時間 1,479 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<algorithm>
#include<queue>
#include<functional>
#include<numeric>
#include<sstream>
#include<math.h>
#include <iomanip>
#define ll long long
#define PLL pair<ll,ll>
#define VS vector<string>
#define VL vector<ll>
#define VB vector<bool>
#define VPLL vector<pair<ll,ll> >
#define VVL vector<vector<ll> >
#define VVVL vector<vector<vector<ll> > >
#define VVB vector<vector<bool> >
#define rep(i,a) for (ll i=0;i<a;i++)
#define nrep(i,n,a) for (ll i=n;i<a;i++)
#define mrep(i,a) for(ll i=a;i>=0;i--)
#define INF 1000000000000000000
#define PI 3.141592653589793238
#define vmin(vec) *std::min_element(vec.begin(),vec.end())
#define vmax(vec) *std::max_element(vec.begin(),vec.end())
#define vsum(vec) std::accumulate(vec.begin(),vec.end(),0LL)
#define ksort(vec) sort(vec.begin(), vec.end(), greater<ll>())
#define ssort(vec) (vec.begin(),vec.end())
#define VPLLsort(vec) sort(vec.begin(), vec.end(),[](PLL &a, PLL &b){ return a.first < b.first; });
#define LTS(n) to_string(n)
#define STL(str) stoll(str)
using namespace std;

int main() {
	VB table(10, true);
	ll n; cin >> n;
	VL a(4);
	bool flag;
	bool fflag;
	string s;
	rep(i, n){
		rep(j, 4) cin >> a[j];
		cin >> s;
		flag = s == "NO";
		if (flag) rep(i, 4) table[a[i]] = false;
		if (!flag){
			rep(ii, 10){
				fflag = false;
				rep(jj, 4) if (a[jj] == ii) fflag = true;
				if (!fflag) table[ii] = false;
			}
		}
	}rep(i, 10) if (table[i]) cout << i << endl;
	return 0;
}
0