結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
Eclair1015
|
| 提出日時 | 2018-09-03 00:42:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 816 bytes |
| コンパイル時間 | 634 ms |
| コンパイル使用メモリ | 66,728 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-04 08:32:00 |
| 合計ジャッジ時間 | 1,170 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 7 |
ソースコード
//inlclude前用define
#define _USE_MATH_DEFINES
//include
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
using namespace std;
//typedef
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<char> VC;
int main() {
int num;
VI y(10), n(10);
cin >> num;
int a, b, c, d,cnt=0,memo;
string r;
for (int i = 0; i < num; i++) {
cin >> a >> b >> c >> d >> r;
cnt = 0;
memo = 0;
if (r == "NO") {
n[a]++;
n[b]++;
n[c]++;
n[d]++;
for (int j = 0; j < 10; j++) {
if (n[j] == 0) {
cnt++;
memo = j;
}
}
if (cnt == 1) cout << memo << endl;
} else if(r=="YES"){
y[a]++;
y[b]++;
y[c]++;
y[d]++;
for (int j = 0; j < 10; j++) {
if (y[j] >= 2) {
cout << j << endl;
}
}
}
}
return 0;
}
Eclair1015