제출 #1151583

#제출 시각아이디문제언어결과실행 시간메모리
1151583AbdullahIshfaqLight Bulbs (EGOI24_lightbulbs)C++20
11 / 100
1 ms432 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define MOD 998244353 void solve(){ int n; cin >> n; for(int i = 0; i < (1 << (n * n)); i++){ int c = 0, grid[n][n] = {}, resp; cout << "?" << endl; for(int j = 0; j < n; j++){ for (int k = 0; k < n; k++){ if(i & (1 << c)){ grid[j][k] = 1; } c++; cout << grid[j][k]; } cout << endl; } cin >> resp; if(resp == (n * n)){ cout << "!" << endl; for (int j = 0; j < n; j++){ for (int k = 0; k < n; k++){ cout << grid[j][k]; } cout << endl; } return ; } } } int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int tests = 1; // cin >> tests; for(int i = 1; i <= tests; i ++) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...