結果
問題 |
No.24 数当てゲーム
|
ユーザー |
![]() |
提出日時 | 2019-04-01 21:55:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 650 bytes |
コンパイル時間 | 664 ms |
コンパイル使用メモリ | 74,812 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-26 22:36:27 |
合計ジャッジ時間 | 1,222 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 WA * 3 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main(void) { int num, i = 0, j, k; cin >> num; string s; vector<int> ans(10, 0), qs(5, 100); for (; i < num; i++) { scanf("%d%d%d%d", &qs[0], &qs[1], &qs[2], &qs[3]); cin >> s; sort(qs.begin(), qs.end()); if (s == "YES") { for (j = 0, k = 0; j < 10; j++) { if (ans[j] == 2) continue; if (j == qs[k]) { ans[j] = 1; k++; } else ans[j] = 2; } } else { for (j = 0; j < 4; j++) ans[qs[j]] = 2; } } for (i = 0; i < 10; i++) { if (ans[i] != 2) cout << i << "\n"; } return 0; }