Submission #1062332

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10623322024-08-17 03:23:58PurpleCrayonLight Bulbs (EGOI24_lightbulbs)C++17
80 / 100
4 ms836 KiB
#include <bits/stdc++.h>
using namespace std;
#define sz(v) int(v.size())
#define ar array
typedef long long ll;
const int N = 50, MOD = 1e9+7;
const ll INF = 1e18+10;
void solve() {
int n; cin >> n;
vector<int> row_ord(n), col_ord(n);
iota(row_ord.begin(), row_ord.end(), 0);
iota(col_ord.begin(), col_ord.end(), 0);
random_shuffle(row_ord.begin(), row_ord.end());
random_shuffle(col_ord.begin(), col_ord.end());
auto pr = [&](vector<pair<int, int>> v) {
vector<string> g(n, string(n, '0'));
for (auto [i, j] : v) g[i][j] = '1';
for (auto& r : g) cout << r << '\n';
cout.flush();
};
int si = row_ord[0], sj = col_ord[0];
bool h_top = true;
auto get_type = [&](int i, int j, bool b) { // b is true if I know the type of si sj already
if (b) {
cout << "?\n";
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...