# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1179057 | Ahmed_Kaaniche | 코알라 (APIO17_koala) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define ll long long
#define fi first
#define se second
#define pb push_back
ll cnt=0;
void playRound(vector<int> &b, vector<int> &r) {
cnt++;
for (auto &elt: b)
cout << elt << ' ';
cout << endl;
for (auto &elt: r)
cin >> elt;
}
int minValue(int N, int W) {
vector<int> b(100, 0);
vector<int> r(100);
b[0] = 1;
playRound(b, r);
if (r[0] <= 1)
return 0;
else {
for (int i = 0; i < N; ++i) {
if (r[i] == 0)
return i;
}
}
}
int maxValue(int N, int W) {
}
bool greaterValue(int N, int W) {
}
void allValues(int N, int W, vector<int> &P) {
}
void runGame(int x) {
int f, g;
cin >> f >> g;
for (int i = 0; i < g; ++i) {
int n, w;
cin >> n >> w;
vector<int> p(n);
for (int j = 0; j < n; ++j) {
cin >> p[i];
}
if (f == 1) {
cnt=0;
cout << cnt << endl << minValue(n,w) << endl;
} else if (f == 2) {
cnt=0;
cout << cnt << endl << maxValue(n,w) << endl;
} else if (f == 3) {
cnt=0;
cout << cnt << endl << greaterValue(n,w) << endl;
} else if (f == 4) {
cnt=0;
vector<int>P(n);
cout << cnt << endl;
allValues(n,w,P);
for(auto &elt : P)
cout << elt << ' ';
cout << endl;
}
}
}