Submission #1110256

#TimeUsernameProblemLanguageResultExecution timeMemory
1110256vjudge1Table Tennis (JOI24_tabletennis)C++17
0 / 100
1 ms336 KiB
#include<bits/stdc++.h> using namespace std; int n,m; void sol(){ cin >>n>>m; int p=n-m-1; cout <<"YES"<<'\n'; for(int i=2;i<=n;i++){ for(int j=1;j<i;j++){ if(i==p+1&&j==p)cout <<0; else cout <<1; } cout <<'\n'; } } int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); if(fopen("c.INP","r")){ freopen("c.INP","r",stdin); freopen("c.OUT","w",stdout); } int q; cin >>q; while(q--){ sol(); cout <<'\n'; } }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:21:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |         freopen("c.INP","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~
Main.cpp:22:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   22 |         freopen("c.OUT","w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...