제출 #1151819

#제출 시각아이디문제언어결과실행 시간메모리
1151819Muhammad_AneeqLight Bulbs (EGOI24_lightbulbs)C++20
11 / 100
2 ms408 KiB
/* بسم الله الرحمن الرحيم Author: (:Muhammad Aneeq:) */ #include <iostream> #warning check the output using namespace std; inline void solve() { int n; cin>>n; int f=n*n; int an=n*n,val=(1<<f); for (int i=1;i<(1<<f);i++) { cout<<"?\n"; int cnt=0; for (int j=0;j<n;j++) { for (int k=0;k<n;k++) { int z=j*n+k; if ((1<<z)&i) { cnt++; cout<<1; } else cout<<0; } cout<<'\n'; } int z; cin>>z; if (z==f) { if (an>cnt) { an=cnt; val=i; } } } cout<<"!\n"; for (int j=0;j<n;j++) { for (int k=0;k<n;k++) { int z=j*n+k; if ((1<<z)&val) cout<<1; else cout<<0; } cout<<'\n'; } if (an!=n) { if (an==n*n) exit(-1); } } int main() { int t=1; for (int i=1;i<=t;i++) { solve(); } }

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp:8:2: warning: #warning check the output [-Wcpp]
    8 | #warning check the output
      |  ^~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...